diff --git a/angular.json b/angular.json index 8be9cbd..5d502fd 100644 --- a/angular.json +++ b/angular.json @@ -29,7 +29,9 @@ "styles": [ "src/styles.scss" ], - "scripts": [] + "scripts": [ + "node_modules/jquery/dist/jquery.min.js" + ] }, "configurations": { "production": { diff --git a/dist/ngx-flowchart/bundles/ngx-flowchart.umd.js b/dist/ngx-flowchart/bundles/ngx-flowchart.umd.js index 126b0be..d08384a 100644 --- a/dist/ngx-flowchart/bundles/ngx-flowchart.umd.js +++ b/dist/ngx-flowchart/bundles/ngx-flowchart.umd.js @@ -1,73 +1,4526 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) : - typeof define === 'function' && define.amd ? define('ngx-flowchart', ['exports', '@angular/core'], factory) : - (global = global || self, factory(global['ngx-flowchart'] = {}, global.ng.core)); -}(this, (function (exports, core) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common')) : + typeof define === 'function' && define.amd ? define('ngx-flowchart', ['exports', '@angular/core', 'rxjs', '@angular/common'], factory) : + (global = global || self, factory(global['ngx-flowchart'] = {}, global.ng.core, global.rxjs, global.ng.common)); +}(this, (function (exports, core, rxjs, common) { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */ + /* global Reflect, Promise */ + + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + } + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + } + + function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + } + + function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + } + + function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + } + + function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + + function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + function __exportStar(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + } + + function __values(o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + } + + function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + } + + function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + } + + function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + } + + function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + } + + function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + } + + function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + } + + function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; + } + + function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; + } + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + /** @type {?} */ + var FC_NODE_COMPONENT_CONFIG = new core.InjectionToken('fc-node.component.config'); + /** + * @record + */ + function FcNodeComponentConfig() { } + if (false) { + /** @type {?} */ + FcNodeComponentConfig.prototype.nodeComponentType; + } + /** @type {?} */ + var htmlPrefix = 'fc'; + /** @type {?} */ + var leftConnectorType = 'leftConnector'; + /** @type {?} */ + var rightConnectorType = 'rightConnector'; + /** @type {?} */ + var FlowchartConstants = { + htmlPrefix: htmlPrefix, + leftConnectorType: leftConnectorType, + rightConnectorType: rightConnectorType, + curvedStyle: 'curved', + lineStyle: 'line', + dragAnimationRepaint: 'repaint', + dragAnimationShadow: 'shadow', + canvasClass: htmlPrefix + '-canvas', + selectedClass: htmlPrefix + '-selected', + editClass: htmlPrefix + '-edit', + activeClass: htmlPrefix + '-active', + hoverClass: htmlPrefix + '-hover', + draggingClass: htmlPrefix + '-dragging', + edgeClass: htmlPrefix + '-edge', + edgeLabelClass: htmlPrefix + '-edge-label', + connectorClass: htmlPrefix + '-connector', + magnetClass: htmlPrefix + '-magnet', + nodeClass: htmlPrefix + '-node', + nodeOverlayClass: htmlPrefix + '-node-overlay', + leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's', + rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's', + canvasResizeThreshold: 200, + canvasResizeStep: 200 + }; + /** + * @record + */ + function FcCoords() { } + if (false) { + /** @type {?|undefined} */ + FcCoords.prototype.x; + /** @type {?|undefined} */ + FcCoords.prototype.y; + } + /** + * @record + */ + function FcOffset() { } + if (false) { + /** @type {?} */ + FcOffset.prototype.top; + /** @type {?} */ + FcOffset.prototype.left; + } + /** + * @record + */ + function FcRectBox() { } + if (false) { + /** @type {?} */ + FcRectBox.prototype.top; + /** @type {?} */ + FcRectBox.prototype.left; + /** @type {?} */ + FcRectBox.prototype.right; + /** @type {?} */ + FcRectBox.prototype.bottom; + } + /** + * @record + */ + function FcConnector() { } + if (false) { + /** @type {?} */ + FcConnector.prototype.id; + /** @type {?} */ + FcConnector.prototype.type; + } + /** + * @record + */ + function FcNode() { } + if (false) { + /** @type {?} */ + FcNode.prototype.id; + /** @type {?} */ + FcNode.prototype.name; + /** @type {?} */ + FcNode.prototype.connectors; + /** @type {?|undefined} */ + FcNode.prototype.readonly; + /* Skipping unhandled member: [key: string]: any;*/ + } + /** + * @record + */ + function FcEdge() { } + if (false) { + /** @type {?|undefined} */ + FcEdge.prototype.label; + /** @type {?|undefined} */ + FcEdge.prototype.source; + /** @type {?|undefined} */ + FcEdge.prototype.destination; + /** @type {?|undefined} */ + FcEdge.prototype.active; + } + /** + * @record + */ + function FcItemInfo() { } + if (false) { + /** @type {?|undefined} */ + FcItemInfo.prototype.node; + /** @type {?|undefined} */ + FcItemInfo.prototype.edge; + } + /** + * @record + */ + function FcModel() { } + if (false) { + /** @type {?} */ + FcModel.prototype.nodes; + /** @type {?} */ + FcModel.prototype.edges; + } + /** + * @record + */ + function UserCallbacks() { } + if (false) { + /** @type {?|undefined} */ + UserCallbacks.prototype.dropNode; + /** @type {?|undefined} */ + UserCallbacks.prototype.createEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeAdded; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeDoubleClick; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeMouseOver; + /** @type {?|undefined} */ + UserCallbacks.prototype.isValidEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeEdit; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeCallbacks; + } + /** + * @record + */ + function UserNodeCallbacks() { } + if (false) { + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.nodeEdit; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.doubleClick; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseDown; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseEnter; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseLeave; + } + /** + * @record + */ + function FcCallbacks() { } + if (false) { + /** @type {?} */ + FcCallbacks.prototype.nodeDragstart; + /** @type {?} */ + FcCallbacks.prototype.nodeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDragstart; + /** @type {?} */ + FcCallbacks.prototype.edgeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDrop; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverConnector; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverMagnet; + /** @type {?} */ + FcCallbacks.prototype.edgeDragleaveMagnet; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOver; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOut; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseEnter; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseLeave; + /** @type {?} */ + FcCallbacks.prototype.nodeClicked; + } + /** + * @record + */ + function FcAdjacentList() { } + var ModelvalidationError = /** @class */ (function (_super) { + __extends(ModelvalidationError, _super); + function ModelvalidationError(message) { + return _super.call(this, message) || this; + } + return ModelvalidationError; + }(Error)); + /** + * @param {?} graph + * @return {?} + */ + function fcTopSort(graph) { + var e_1, _a, e_2, _b; + /** @type {?} */ + var adjacentList = {}; + graph.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + adjacentList[node.id] = { incoming: 0, outgoing: [] }; + })); + graph.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var sourceNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.id === edge.source; + })); + }))[0]; + /** @type {?} */ + var destinationNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.id === edge.destination; + })); + }))[0]; + adjacentList[sourceNode.id].outgoing.push(destinationNode.id); + adjacentList[destinationNode.id].incoming++; + })); + /** @type {?} */ + var orderedNodes = []; + /** @type {?} */ + var sourceNodes = []; + try { + for (var _c = __values(Object.keys(adjacentList)), _d = _c.next(); !_d.done; _d = _c.next()) { + var node = _d.value; + /** @type {?} */ + var edges = adjacentList[node]; + if (edges.incoming === 0) { + sourceNodes.push(node); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_1) throw e_1.error; } + } + while (sourceNodes.length !== 0) { + /** @type {?} */ + var sourceNode = sourceNodes.pop(); + for (var i = 0; i < adjacentList[sourceNode].outgoing.length; i++) { + /** @type {?} */ + var destinationNode = adjacentList[sourceNode].outgoing[i]; + adjacentList[destinationNode].incoming--; + if (adjacentList[destinationNode].incoming === 0) { + sourceNodes.push(destinationNode); + } + adjacentList[sourceNode].outgoing.splice(i, 1); + i--; + } + orderedNodes.push(sourceNode); + } + /** @type {?} */ + var hasEdges = false; + try { + for (var _e = __values(Object.keys(adjacentList)), _f = _e.next(); !_f.done; _f = _e.next()) { + var node = _f.value; + /** @type {?} */ + var edges = adjacentList[node]; + if (edges.incoming !== 0) { + hasEdges = true; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_2) throw e_2.error; } + } + if (hasEdges) { + return null; + } + else { + return orderedNodes; + } + } + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + var FcModelService = /** @class */ (function () { + function FcModelService(modelValidation, model, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) { + this.connectorsHtmlElements = {}; + this.nodesHtmlElements = {}; + this.canvasHtmlElement = null; + this.dragImage = null; + this.svgHtmlElement = null; + this.modelValidation = modelValidation; + this.model = model; + this.cd = cd; + this.canvasHtmlElement = canvasHtmlElement; + this.svgHtmlElement = svgHtmlElement; + this.modelValidation.validateModel(this.model); + this.selectedObjects = selectedObjects; + this.dropNode = dropNode || ((/** + * @return {?} + */ + function () { })); + this.createEdge = createEdge || ((/** + * @return {?} + */ + function () { return rxjs.of({ label: 'label' }); })); + this.edgeAddedCallback = edgeAddedCallback || ((/** + * @return {?} + */ + function () { })); + this.nodeRemovedCallback = nodeRemovedCallback || ((/** + * @return {?} + */ + function () { })); + this.edgeRemovedCallback = edgeRemovedCallback || ((/** + * @return {?} + */ + function () { })); + this.connectors = new ConnectorsModel(this); + this.nodes = new NodesModel(this); + this.edges = new EdgesModel(this); + } + /** + * @return {?} + */ + FcModelService.prototype.detectChanges = /** + * @return {?} + */ + function () { + var _this = this; + setTimeout((/** + * @return {?} + */ + function () { + _this.cd.detectChanges(); + }), 0); + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.selectObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + if (this.isEditable()) { + if (this.selectedObjects.indexOf(object) === -1) { + this.selectedObjects.push(object); + } + } + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.deselectObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + if (this.isEditable()) { + /** @type {?} */ + var index = this.selectedObjects.indexOf(object); + if (index === -1) { + throw new Error('Tried to deselect an unselected object'); + } + this.selectedObjects.splice(index, 1); + } + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.toggleSelectedObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + if (this.isSelectedObject(object)) { + this.deselectObject(object); + } + else { + this.selectObject(object); + } + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.isSelectedObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.selectedObjects.indexOf(object) !== -1; + }; + /** + * @return {?} + */ + FcModelService.prototype.selectAll = /** + * @return {?} + */ + function () { + var _this = this; + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + if (!node.readonly) { + _this.nodes.select(node); + } + })); + this.model.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + _this.edges.select(edge); + })); + this.detectChanges(); + }; + /** + * @return {?} + */ + FcModelService.prototype.deselectAll = /** + * @return {?} + */ + function () { + this.selectedObjects.splice(0, this.selectedObjects.length); + this.detectChanges(); + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.isEditObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.selectedObjects.length === 1 && + this.selectedObjects.indexOf(object) !== -1; + }; + /** + * @private + * @param {?} x + * @param {?} y + * @param {?} rectBox + * @return {?} + */ + FcModelService.prototype.inRectBox = /** + * @private + * @param {?} x + * @param {?} y + * @param {?} rectBox + * @return {?} + */ + function (x, y, rectBox) { + return x >= rectBox.left && x <= rectBox.right && + y >= rectBox.top && y <= rectBox.bottom; + }; + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + FcModelService.prototype.getItemInfoAtPoint = /** + * @param {?} x + * @param {?} y + * @return {?} + */ + function (x, y) { + return { + node: this.getNodeAtPoint(x, y), + edge: this.getEdgeAtPoint(x, y) + }; + }; + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + FcModelService.prototype.getNodeAtPoint = /** + * @param {?} x + * @param {?} y + * @return {?} + */ + function (x, y) { + var e_1, _a; + try { + for (var _b = __values(this.model.nodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + /** @type {?} */ + var element = this.nodes.getHtmlElement(node.id); + /** @type {?} */ + var nodeElementBox = element.getBoundingClientRect(); + if (x >= nodeElementBox.left && x <= nodeElementBox.right + && y >= nodeElementBox.top && y <= nodeElementBox.bottom) { + return node; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return null; + }; + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + FcModelService.prototype.getEdgeAtPoint = /** + * @param {?} x + * @param {?} y + * @return {?} + */ + function (x, y) { + /** @type {?} */ + var element = document.elementFromPoint(x, y); + /** @type {?} */ + var id = element.id; + /** @type {?} */ + var edgeIndex = -1; + if (id) { + if (id.startsWith('fc-edge-path-')) { + edgeIndex = Number(id.substring('fc-edge-path-'.length)); + } + else if (id.startsWith('fc-edge-label-')) { + edgeIndex = Number(id.substring('fc-edge-label-'.length)); + } + } + if (edgeIndex > -1) { + return this.model.edges[edgeIndex]; + } + return null; + }; + /** + * @param {?} rectBox + * @return {?} + */ + FcModelService.prototype.selectAllInRect = /** + * @param {?} rectBox + * @return {?} + */ + function (rectBox) { + var _this = this; + this.model.nodes.forEach((/** + * @param {?} value + * @return {?} + */ + function (value) { + /** @type {?} */ + var element = _this.nodes.getHtmlElement(value.id); + /** @type {?} */ + var nodeElementBox = element.getBoundingClientRect(); + if (!value.readonly) { + /** @type {?} */ + var x = nodeElementBox.left + nodeElementBox.width / 2; + /** @type {?} */ + var y = nodeElementBox.top + nodeElementBox.height / 2; + if (_this.inRectBox(x, y, rectBox)) { + _this.nodes.select(value); + } + else { + if (_this.nodes.isSelected(value)) { + _this.nodes.deselect(value); + } + } + } + })); + /** @type {?} */ + var canvasElementBox = this.canvasHtmlElement.getBoundingClientRect(); + this.model.edges.forEach((/** + * @param {?} value + * @return {?} + */ + function (value) { + /** @type {?} */ + var start = _this.edges.sourceCoord(value); + /** @type {?} */ + var end = _this.edges.destCoord(value); + /** @type {?} */ + var x = (start.x + end.x) / 2 + canvasElementBox.left; + /** @type {?} */ + var y = (start.y + end.y) / 2 + canvasElementBox.top; + if (_this.inRectBox(x, y, rectBox)) { + _this.edges.select(value); + } + else { + if (_this.edges.isSelected(value)) { + _this.edges.deselect(value); + } + } + })); + }; + /** + * @return {?} + */ + FcModelService.prototype.deleteSelected = /** + * @return {?} + */ + function () { + var _this = this; + /** @type {?} */ + var edgesToDelete = this.edges.getSelectedEdges(); + edgesToDelete.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + _this.edges.delete(edge); + })); + /** @type {?} */ + var nodesToDelete = this.nodes.getSelectedNodes(); + nodesToDelete.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + _this.nodes.delete(node); + })); + }; + /** + * @return {?} + */ + FcModelService.prototype.isEditable = /** + * @return {?} + */ + function () { + return this.dropTargetId === undefined; + }; + /** + * @return {?} + */ + FcModelService.prototype.isDropSource = /** + * @return {?} + */ + function () { + return this.dropTargetId !== undefined; + }; + /** + * @return {?} + */ + FcModelService.prototype.getDragImage = /** + * @return {?} + */ + function () { + if (!this.dragImage) { + this.dragImage = new Image(); + this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + this.dragImage.style.visibility = 'hidden'; + } + return this.dragImage; + }; + /** + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @return {?} + */ + FcModelService.prototype.registerCallbacks = /** + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @return {?} + */ + function (edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback) { + this.edgeAddedCallback = edgeAddedCallback; + this.nodeRemovedCallback = nodeRemovedCallback; + this.edgeRemovedCallback = edgeRemovedCallback; + }; + return FcModelService; + }()); + if (false) { + /** @type {?} */ + FcModelService.prototype.modelValidation; + /** @type {?} */ + FcModelService.prototype.model; + /** @type {?} */ + FcModelService.prototype.cd; + /** @type {?} */ + FcModelService.prototype.selectedObjects; + /** @type {?} */ + FcModelService.prototype.connectorsHtmlElements; + /** @type {?} */ + FcModelService.prototype.nodesHtmlElements; + /** @type {?} */ + FcModelService.prototype.canvasHtmlElement; + /** @type {?} */ + FcModelService.prototype.dragImage; + /** @type {?} */ + FcModelService.prototype.svgHtmlElement; + /** @type {?} */ + FcModelService.prototype.dropNode; + /** @type {?} */ + FcModelService.prototype.createEdge; + /** @type {?} */ + FcModelService.prototype.edgeAddedCallback; + /** @type {?} */ + FcModelService.prototype.nodeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.edgeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.dropTargetId; + /** @type {?} */ + FcModelService.prototype.connectors; + /** @type {?} */ + FcModelService.prototype.nodes; + /** @type {?} */ + FcModelService.prototype.edges; + } + /** + * @record + */ + function HtmlElementMap() { } + /** + * @abstract + * @template T + */ + var /** + * @abstract + * @template T + */ + AbstractFcModel = /** @class */ (function () { + function AbstractFcModel(modelService) { + this.modelService = modelService; + } + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.select = /** + * @param {?} object + * @return {?} + */ + function (object) { + this.modelService.selectObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.deselect = /** + * @param {?} object + * @return {?} + */ + function (object) { + this.modelService.deselectObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.toggleSelected = /** + * @param {?} object + * @return {?} + */ + function (object) { + this.modelService.toggleSelectedObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.isSelected = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.modelService.isSelectedObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.isEdit = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.modelService.isEditObject(object); + }; + return AbstractFcModel; + }()); + if (false) { + /** @type {?} */ + AbstractFcModel.prototype.modelService; + } + var ConnectorsModel = /** @class */ (function (_super) { + __extends(ConnectorsModel, _super); + function ConnectorsModel(modelService) { + return _super.call(this, modelService) || this; + } + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getConnector = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + var e_2, _a, e_3, _b; + /** @type {?} */ + var model = this.modelService.model; + try { + for (var _c = __values(model.nodes), _d = _c.next(); !_d.done; _d = _c.next()) { + var node = _d.value; + try { + for (var _e = (e_3 = void 0, __values(node.connectors)), _f = _e.next(); !_f.done; _f = _e.next()) { + var connector = _f.value; + if (connector.id === connectorId) { + return connector; + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_3) throw e_3.error; } + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_2) throw e_2.error; } + } + }; + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getHtmlElement = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + return this.modelService.connectorsHtmlElements[connectorId]; + }; + /** + * @param {?} connectorId + * @param {?} element + * @return {?} + */ + ConnectorsModel.prototype.setHtmlElement = /** + * @param {?} connectorId + * @param {?} element + * @return {?} + */ + function (connectorId, element) { + this.modelService.connectorsHtmlElements[connectorId] = element; + this.modelService.detectChanges(); + }; + /** + * @private + * @param {?} connectorId + * @param {?=} centered + * @return {?} + */ + ConnectorsModel.prototype._getCoords = /** + * @private + * @param {?} connectorId + * @param {?=} centered + * @return {?} + */ + function (connectorId, centered) { + /** @type {?} */ + var element = this.getHtmlElement(connectorId); + /** @type {?} */ + var canvas = this.modelService.canvasHtmlElement; + if (element === null || element === undefined || canvas === null) { + return { x: 0, y: 0 }; + } + /** @type {?} */ + var connectorElementBox = element.getBoundingClientRect(); + /** @type {?} */ + var canvasElementBox = canvas.getBoundingClientRect(); + /** @type {?} */ + var coords = { + x: connectorElementBox.left - canvasElementBox.left, + y: connectorElementBox.top - canvasElementBox.top + }; + if (centered) { + coords = { + x: Math.round(coords.x + element.offsetWidth / 2), + y: Math.round(coords.y + element.offsetHeight / 2) + }; + } + return coords; + }; + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getCoords = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + return this._getCoords(connectorId, false); + }; + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getCenteredCoord = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + return this._getCoords(connectorId, true); + }; + return ConnectorsModel; + }(AbstractFcModel)); + var NodesModel = /** @class */ (function (_super) { + __extends(NodesModel, _super); + function NodesModel(modelService) { + return _super.call(this, modelService) || this; + } + /** + * @param {?} node + * @param {?} type + * @return {?} + */ + NodesModel.prototype.getConnectorsByType = /** + * @param {?} node + * @param {?} type + * @return {?} + */ + function (node, type) { + return node.connectors.filter((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.type === type; + })); + }; + /** + * @private + * @param {?} node + * @param {?} connector + * @return {?} + */ + NodesModel.prototype._addConnector = /** + * @private + * @param {?} node + * @param {?} connector + * @return {?} + */ + function (node, connector) { + node.connectors.push(connector); + try { + this.modelService.modelValidation.validateNode(node); + } + catch (error) { + node.connectors.splice(node.connectors.indexOf(connector), 1); + throw error; + } + }; + /** + * @param {?} node + * @return {?} + */ + NodesModel.prototype.delete = /** + * @param {?} node + * @return {?} + */ + function (node) { + if (this.isSelected(node)) { + this.deselect(node); + } + /** @type {?} */ + var model = this.modelService.model; + /** @type {?} */ + var index = model.nodes.indexOf(node); + if (index === -1) { + if (node === undefined) { + throw new Error('Passed undefined'); + } + throw new Error('Tried to delete not existing node'); + } + /** @type {?} */ + var connectorIds = this.getConnectorIds(node); + for (var i = 0; i < model.edges.length; i++) { + /** @type {?} */ + var edge = model.edges[i]; + if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) { + this.modelService.edges.delete(edge); + i--; + } + } + model.nodes.splice(index, 1); + this.modelService.nodeRemovedCallback(node); + }; + /** + * @return {?} + */ + NodesModel.prototype.getSelectedNodes = /** + * @return {?} + */ + function () { + var _this = this; + /** @type {?} */ + var model = this.modelService.model; + return model.nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { + return _this.modelService.nodes.isSelected(node); + })); + }; + /** + * @param {?} node + * @param {?=} ctrlKey + * @return {?} + */ + NodesModel.prototype.handleClicked = /** + * @param {?} node + * @param {?=} ctrlKey + * @return {?} + */ + function (node, ctrlKey) { + if (ctrlKey) { + this.modelService.nodes.toggleSelected(node); + } + else { + this.modelService.deselectAll(); + this.modelService.nodes.select(node); + } + }; + /** + * @private + * @param {?} node + * @return {?} + */ + NodesModel.prototype._addNode = /** + * @private + * @param {?} node + * @return {?} + */ + function (node) { + /** @type {?} */ + var model = this.modelService.model; + try { + model.nodes.push(node); + this.modelService.modelValidation.validateNodes(model.nodes); + } + catch (error) { + model.nodes.splice(model.nodes.indexOf(node), 1); + throw error; + } + }; + /** + * @param {?} node + * @return {?} + */ + NodesModel.prototype.getConnectorIds = /** + * @param {?} node + * @return {?} + */ + function (node) { + return node.connectors.map((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.id; + })); + }; + /** + * @param {?} connectorId + * @return {?} + */ + NodesModel.prototype.getNodeByConnectorId = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + var e_4, _a; + /** @type {?} */ + var model = this.modelService.model; + try { + for (var _b = __values(model.nodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + /** @type {?} */ + var connectorIds = this.getConnectorIds(node); + if (connectorIds.indexOf(connectorId) > -1) { + return node; + } + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_4) throw e_4.error; } + } + return null; + }; + /** + * @param {?} nodeId + * @return {?} + */ + NodesModel.prototype.getHtmlElement = /** + * @param {?} nodeId + * @return {?} + */ + function (nodeId) { + return this.modelService.nodesHtmlElements[nodeId]; + }; + /** + * @param {?} nodeId + * @param {?} element + * @return {?} + */ + NodesModel.prototype.setHtmlElement = /** + * @param {?} nodeId + * @param {?} element + * @return {?} + */ + function (nodeId, element) { + this.modelService.nodesHtmlElements[nodeId] = element; + this.modelService.detectChanges(); + }; + return NodesModel; + }(AbstractFcModel)); + var EdgesModel = /** @class */ (function (_super) { + __extends(EdgesModel, _super); + function EdgesModel(modelService) { + return _super.call(this, modelService) || this; + } + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.ready = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var source = this.modelService.connectors.getHtmlElement(edge.source); + /** @type {?} */ + var destination = this.modelService.connectors.getHtmlElement(edge.destination); + return source !== undefined && destination !== undefined; + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.sourceCoord = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + return this.modelService.connectors.getCenteredCoord(edge.source); + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.destCoord = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + return this.modelService.connectors.getCenteredCoord(edge.destination); + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.delete = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var model = this.modelService.model; + /** @type {?} */ + var index = model.edges.indexOf(edge); + if (index === -1) { + throw new Error('Tried to delete not existing edge'); + } + if (this.isSelected(edge)) { + this.deselect(edge); + } + model.edges.splice(index, 1); + this.modelService.edgeRemovedCallback(edge); + }; + /** + * @return {?} + */ + EdgesModel.prototype.getSelectedEdges = /** + * @return {?} + */ + function () { + var _this = this; + /** @type {?} */ + var model = this.modelService.model; + return model.edges.filter((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + return _this.modelService.edges.isSelected(edge); + })); + }; + /** + * @param {?} edge + * @param {?=} ctrlKey + * @return {?} + */ + EdgesModel.prototype.handleEdgeMouseClick = /** + * @param {?} edge + * @param {?=} ctrlKey + * @return {?} + */ + function (edge, ctrlKey) { + if (ctrlKey) { + this.modelService.edges.toggleSelected(edge); + } + else { + this.modelService.deselectAll(); + this.modelService.edges.select(edge); + } + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.putEdge = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var model = this.modelService.model; + model.edges.push(edge); + }; + /** + * @param {?} event + * @param {?} sourceConnector + * @param {?} destConnector + * @param {?} label + * @return {?} + */ + EdgesModel.prototype._addEdge = /** + * @param {?} event + * @param {?} sourceConnector + * @param {?} destConnector + * @param {?} label + * @return {?} + */ + function (event, sourceConnector, destConnector, label) { + var _this = this; + this.modelService.modelValidation.validateConnector(sourceConnector); + this.modelService.modelValidation.validateConnector(destConnector); + /** @type {?} */ + var edge = {}; + edge.source = sourceConnector.id; + edge.destination = destConnector.id; + edge.label = label; + /** @type {?} */ + var model = this.modelService.model; + this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes); + this.modelService.createEdge(event, edge).subscribe((/** + * @param {?} created + * @return {?} + */ + function (created) { + model.edges.push(created); + _this.modelService.edgeAddedCallback(created); + })); + }; + return EdgesModel; + }(AbstractFcModel)); + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + var FcModelValidationService = /** @class */ (function () { + function FcModelValidationService() { + } + /** + * @param {?} model + * @return {?} + */ + FcModelValidationService.prototype.validateModel = /** + * @param {?} model + * @return {?} + */ + function (model) { + this.validateNodes(model.nodes); + this._validateEdges(model.edges, model.nodes); + return model; + }; + /** + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype.validateNodes = /** + * @param {?} nodes + * @return {?} + */ + function (nodes) { + var _this = this; + /** @type {?} */ + var ids = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + _this.validateNode(node); + if (ids.indexOf(node.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + ids.push(node.id); + })); + /** @type {?} */ + var connectorIds = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + if (connectorIds.indexOf(connector.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + connectorIds.push(connector.id); + })); + })); + return nodes; + }; + /** + * @param {?} node + * @return {?} + */ + FcModelValidationService.prototype.validateNode = /** + * @param {?} node + * @return {?} + */ + function (node) { + var _this = this; + if (node.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (typeof node.name !== 'string') { + throw new ModelvalidationError('Name not valid.'); + } + if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (!Array.isArray(node.connectors)) { + throw new ModelvalidationError('Connectors not valid.'); + } + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + _this.validateConnector(connector); + })); + return node; + }; + /** + * @private + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype._validateEdges = /** + * @private + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + function (edges, nodes) { + var _this = this; + edges.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + _this._validateEdge(edge, nodes); + })); + edges.forEach((/** + * @param {?} edge1 + * @param {?} index1 + * @return {?} + */ + function (edge1, index1) { + edges.forEach((/** + * @param {?} edge2 + * @param {?} index2 + * @return {?} + */ + function (edge2, index2) { + if (index1 !== index2) { + if ((edge1.source === edge2.source && edge1.destination === edge2.destination) || + (edge1.source === edge2.destination && edge1.destination === edge2.source)) { + throw new ModelvalidationError('Duplicated edge.'); + } + } + })); + })); + if (fcTopSort({ nodes: nodes, edges: edges }) === null) { + throw new ModelvalidationError('Graph has a circle.'); + } + return edges; + }; + /** + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype.validateEdges = /** + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + function (edges, nodes) { + this.validateNodes(nodes); + return this._validateEdges(edges, nodes); + }; + /** + * @private + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype._validateEdge = /** + * @private + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + function (edge, nodes) { + if (edge.source === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + if (edge.destination === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (edge.source === edge.destination) { + throw new ModelvalidationError('Edge with same source and destination connectors.'); + } + /** @type {?} */ + var sourceNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { return connector.id === edge.source; })); }))[0]; + if (sourceNode === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + /** @type {?} */ + var destinationNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { return connector.id === edge.destination; })); }))[0]; + if (destinationNode === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (sourceNode === destinationNode) { + throw new ModelvalidationError('Edge with same source and destination nodes.'); + } + return edge; + }; + /** + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype.validateEdge = /** + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + function (edge, nodes) { + this.validateNodes(nodes); + return this._validateEdge(edge, nodes); + }; + /** + * @param {?} connector + * @return {?} + */ + FcModelValidationService.prototype.validateConnector = /** + * @param {?} connector + * @return {?} + */ + function (connector) { + if (connector.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') { + throw new ModelvalidationError('Type not valid.'); + } + return connector; + }; + FcModelValidationService.decorators = [ + { type: core.Injectable } + ]; + /** @nocollapse */ + FcModelValidationService.ctorParameters = function () { return []; }; + return FcModelValidationService; + }()); + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + /** @type {?} */ + var nodeDropScope = { + dropElement: null + }; + var FcNodeDraggingService = /** @class */ (function () { + function FcNodeDraggingService(modelService, applyFunction, automaticResize, dragAnimation) { + this.nodeDraggingScope = { + shadowDragStarted: false, + dropElement: null, + draggedNodes: [], + shadowElements: [] + }; + this.dragOffsets = []; + this.draggedElements = []; + this.destinationHtmlElements = []; + this.oldDisplayStyles = []; + this.modelService = modelService; + this.automaticResize = automaticResize; + this.dragAnimation = dragAnimation; + this.applyFunction = applyFunction; + } + /** + * @private + * @param {?} coordinate + * @param {?} max + * @return {?} + */ + FcNodeDraggingService.prototype.getCoordinate = /** + * @private + * @param {?} coordinate + * @param {?} max + * @return {?} + */ + function (coordinate, max) { + coordinate = Math.max(coordinate, 0); + coordinate = Math.min(coordinate, max); + return coordinate; + }; + /** + * @private + * @param {?} x + * @return {?} + */ + FcNodeDraggingService.prototype.getXCoordinate = /** + * @private + * @param {?} x + * @return {?} + */ + function (x) { + return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth); + }; + /** + * @private + * @param {?} y + * @return {?} + */ + FcNodeDraggingService.prototype.getYCoordinate = /** + * @private + * @param {?} y + * @return {?} + */ + function (y) { + return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight); + }; + /** + * @private + * @param {?} draggedNode + * @param {?} nodeElement + * @return {?} + */ + FcNodeDraggingService.prototype.resizeCanvas = /** + * @private + * @param {?} draggedNode + * @param {?} nodeElement + * @return {?} + */ + function (draggedNode, nodeElement) { + if (this.automaticResize && !this.modelService.isDropSource()) { + /** @type {?} */ + var canvasElement = this.modelService.canvasHtmlElement; + if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px'; + } + if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px'; + } + } + }; + /** + * @param {?} node + * @return {?} + */ + FcNodeDraggingService.prototype.isDraggingNode = /** + * @param {?} node + * @return {?} + */ + function (node) { + return this.nodeDraggingScope.draggedNodes.includes(node); + }; + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + FcNodeDraggingService.prototype.dragstart = /** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + var e_1, _a, e_2, _b; + if (node.readonly) { + return; + } + this.dragOffsets.length = 0; + this.draggedElements.length = 0; + this.nodeDraggingScope.draggedNodes.length = 0; + this.nodeDraggingScope.shadowElements.length = 0; + this.destinationHtmlElements.length = 0; + this.oldDisplayStyles.length = 0; + /** @type {?} */ + var elements = []; + /** @type {?} */ + var nodes = []; + if (this.modelService.nodes.isSelected(node)) { + /** @type {?} */ + var selectedNodes = this.modelService.nodes.getSelectedNodes(); + try { + for (var selectedNodes_1 = __values(selectedNodes), selectedNodes_1_1 = selectedNodes_1.next(); !selectedNodes_1_1.done; selectedNodes_1_1 = selectedNodes_1.next()) { + var selectedNode = selectedNodes_1_1.value; + /** @type {?} */ + var element = $(this.modelService.nodes.getHtmlElement(selectedNode.id)); + elements.push(element); + nodes.push(selectedNode); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (selectedNodes_1_1 && !selectedNodes_1_1.done && (_a = selectedNodes_1.return)) _a.call(selectedNodes_1); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + elements.push($((/** @type {?} */ (event.target)))); + nodes.push(node); + } + /** @type {?} */ + var offsetsX = []; + /** @type {?} */ + var offsetsY = []; + try { + for (var elements_1 = __values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) { + var element = elements_1_1.value; + offsetsX.push(parseInt(element.css('left'), 10) - event.clientX); + offsetsY.push(parseInt(element.css('top'), 10) - event.clientY); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (elements_1_1 && !elements_1_1.done && (_b = elements_1.return)) _b.call(elements_1); + } + finally { if (e_2) throw e_2.error; } + } + /** @type {?} */ + var originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + if (this.modelService.isDropSource()) { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + nodeDropScope.dropElement = (/** @type {?} */ (elements[0][0].cloneNode(true))); + /** @type {?} */ + var offset = $(this.modelService.canvasHtmlElement).offset(); + nodeDropScope.dropElement.offsetInfo = { + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + nodeDropScope.dropElement.style.position = 'absolute'; + nodeDropScope.dropElement.style.pointerEvents = 'none'; + nodeDropScope.dropElement.style.zIndex = '9999'; + document.body.appendChild(nodeDropScope.dropElement); + /** @type {?} */ + var dropNodeInfo = { + node: node, + dropTargetId: this.modelService.dropTargetId, + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo)); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + /** @type {?} */ + var target = (/** @type {?} */ (event.target)); + this.destinationHtmlElements.push(target); + this.oldDisplayStyles.push(target.style.display); + target.style.display = 'none'; + this.nodeDraggingScope.shadowDragStarted = true; + } + return; + } + this.nodeDraggingScope.draggedNodes = nodes; + for (var i = 0; i < elements.length; i++) { + this.draggedElements.push(elements[i][0]); + this.dragOffsets.push({ + x: offsetsX[i], + y: offsetsY[i] + }); + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + for (var i = 0; i < this.draggedElements.length; i++) { + /** @type {?} */ + var dragOffset = this.dragOffsets[i]; + /** @type {?} */ + var draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var shadowElement = $("
") + + ("

" + draggedNode.name + "

")); + /** @type {?} */ + var targetInnerNode = $(this.draggedElements[i]).children()[0]; + shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor; + this.nodeDraggingScope.shadowElements.push(shadowElement); + this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]); + } + } + originalEvent.dataTransfer.setData('text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + for (var i = 0; i < this.draggedElements.length; i++) { + this.destinationHtmlElements.push(this.draggedElements[i]); + this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); + this.destinationHtmlElements[i].style.display = 'none'; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.nodeDraggingScope.shadowDragStarted = true; + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeDraggingService.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (this.modelService.isDropSource()) { + event.preventDefault(); + return false; + } + /** @type {?} */ + var dropNode = null; + /** @type {?} */ + var originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + /** @type {?} */ + var infoText = originalEvent.dataTransfer.getData('text'); + if (infoText) { + /** @type {?} */ + var dropNodeInfo = null; + try { + dropNodeInfo = JSON.parse(infoText); + } + catch (e) { } + if (dropNodeInfo && dropNodeInfo.dropTargetId) { + if (this.modelService.canvasHtmlElement.id && + this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) { + dropNode = dropNodeInfo.node; + /** @type {?} */ + var offset = $(this.modelService.canvasHtmlElement).offset(); + /** @type {?} */ + var x = event.clientX - offset.left; + /** @type {?} */ + var y = event.clientY - offset.top; + dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x)); + dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y)); + } + } + } + if (dropNode) { + this.modelService.dropNode(event, dropNode); + event.preventDefault(); + return false; + } + else if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + function () { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = _this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var dragOffset = _this.dragOffsets[i]; + draggedNode.x = Math.round(_this.getXCoordinate(dragOffset.x + event.clientX)); + draggedNode.y = Math.round(_this.getYCoordinate(dragOffset.y + event.clientY)); + } + event.preventDefault(); + return false; + })); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeDraggingService.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (nodeDropScope.dropElement) { + /** @type {?} */ + var offsetInfo = nodeDropScope.dropElement.offsetInfo; + nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px'; + nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px'; + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + function () { + _this.destinationHtmlElements[0].style.display = _this.oldDisplayStyles[0]; + _this.nodeDraggingScope.shadowDragStarted = false; + })); + } + event.preventDefault(); + return; + } + if (this.modelService.isDropSource()) { + event.preventDefault(); + return; + } + if (!this.nodeDraggingScope.draggedNodes.length) { + event.preventDefault(); + return; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + function () { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = _this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var dragOffset = _this.dragOffsets[i]; + draggedNode.x = _this.getXCoordinate(dragOffset.x + event.clientX); + draggedNode.y = _this.getYCoordinate(dragOffset.y + event.clientY); + _this.resizeCanvas(draggedNode, _this.draggedElements[i]); + } + event.preventDefault(); + return false; + })); + } + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.nodeDraggingScope.draggedNodes.length) { + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + function () { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + _this.destinationHtmlElements[i].style.display = _this.oldDisplayStyles[i]; + } + _this.nodeDraggingScope.shadowDragStarted = false; + })); + } + for (var i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var dragOffset = this.dragOffsets[i]; + this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px'); + this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px'); + this.resizeCanvas(draggedNode, this.draggedElements[i]); + } + event.preventDefault(); + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeDraggingService.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + this.applyFunction((/** + * @return {?} + */ + function () { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + if (_this.modelService.isDropSource()) { + return; + } + if (_this.nodeDraggingScope.shadowElements.length) { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = _this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var shadowElement = _this.nodeDraggingScope.shadowElements[i]; + draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10); + draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10); + _this.modelService.canvasHtmlElement.removeChild(shadowElement[0]); + } + _this.nodeDraggingScope.shadowElements.length = 0; + } + if (_this.nodeDraggingScope.draggedNodes.length) { + _this.nodeDraggingScope.draggedNodes.length = 0; + _this.draggedElements.length = 0; + _this.dragOffsets.length = 0; + } + })); + }; + return FcNodeDraggingService; + }()); + if (false) { + /** @type {?} */ + FcNodeDraggingService.prototype.nodeDraggingScope; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragOffsets; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.draggedElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.destinationHtmlElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.oldDisplayStyles; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.automaticResize; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.applyFunction; + } + /** + * @record + */ + function NodeDraggingScope() { } + if (false) { + /** @type {?} */ + NodeDraggingScope.prototype.draggedNodes; + /** @type {?} */ + NodeDraggingScope.prototype.shadowElements; + /** @type {?} */ + NodeDraggingScope.prototype.shadowDragStarted; + /** @type {?} */ + NodeDraggingScope.prototype.dropElement; + } + /** + * @record + */ + function NodeDropElement() { } + if (false) { + /** @type {?|undefined} */ + NodeDropElement.prototype.offsetInfo; + } + /** + * @record + */ + function NodeDropScope() { } + if (false) { + /** @type {?} */ + NodeDropScope.prototype.dropElement; + } + /** + * @record + */ + function DropNodeInfo() { } + if (false) { + /** @type {?} */ + DropNodeInfo.prototype.node; + /** @type {?} */ + DropNodeInfo.prototype.dropTargetId; + /** @type {?} */ + DropNodeInfo.prototype.offsetX; + /** @type {?} */ + DropNodeInfo.prototype.offsetY; + } + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + var FcEdgeDrawingService = /** @class */ (function () { + function FcEdgeDrawingService() { + } + /** + * @param {?} pt1 + * @param {?} pt2 + * @param {?} style + * @return {?} + */ + FcEdgeDrawingService.prototype.getEdgeDAttribute = /** + * @param {?} pt1 + * @param {?} pt2 + * @param {?} style + * @return {?} + */ + function (pt1, pt2, style) { + /** @type {?} */ + var dAddribute = "M " + pt1.x + ", " + pt1.y + " "; + if (style === FlowchartConstants.curvedStyle) { + /** @type {?} */ + var sourceTangent = this.computeEdgeSourceTangent(pt1, pt2); + /** @type {?} */ + var destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2); + dAddribute += "C " + sourceTangent.x + ", " + sourceTangent.y + " " + (destinationTangent.x - 50) + ", " + destinationTangent.y + " " + pt2.x + ", " + pt2.y; + } + else { + dAddribute += "L " + pt2.x + ", " + pt2.y; + } + return dAddribute; + }; + /** + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.getEdgeCenter = /** + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return { + x: (pt1.x + pt2.x) / 2, + y: (pt1.y + pt2.y) / 2 + }; + }; + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.computeEdgeTangentOffset = /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return (pt2.y - pt1.y) / 2; + }; + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.computeEdgeSourceTangent = /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return { + x: pt1.x, + y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2) + }; + }; + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.computeEdgeDestinationTangent = /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return { + x: pt2.x, + y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2) + }; + }; + FcEdgeDrawingService.decorators = [ + { type: core.Injectable } + ]; + /** @nocollapse */ + FcEdgeDrawingService.ctorParameters = function () { return []; }; + return FcEdgeDrawingService; + }()); + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + var FcEdgeDraggingService = /** @class */ (function () { + function FcEdgeDraggingService(modelValidation, edgeDrawingService, modelService, model, isValidEdgeCallback, applyFunction, dragAnimation, edgeStyle) { + this.edgeDragging = { + isDragging: false, + dragPoint1: null, + dragPoint2: null, + shadowDragStarted: false + }; + this.draggedEdgeSource = null; + this.dragOffset = {}; + this.destinationHtmlElement = null; + this.oldDisplayStyle = ''; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.modelService = modelService; + this.model = model; + this.isValidEdgeCallback = isValidEdgeCallback || ((/** + * @return {?} + */ + function () { return true; })); + this.applyFunction = applyFunction; + this.dragAnimation = dragAnimation; + this.edgeStyle = edgeStyle; + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcEdgeDraggingService.prototype.dragstart = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var e_1, _a; + var _this = this; + /** @type {?} */ + var swapConnector; + /** @type {?} */ + var dragLabel; + /** @type {?} */ + var prevEdge; + if (connector.type === FlowchartConstants.leftConnectorType) { + var _loop_1 = function (edge) { + if (edge === connector.id) { + swapConnector = this_1.modelService.connectors.getConnector(edge.source); + dragLabel = edge.label; + prevEdge = edge; + this_1.applyFunction((/** + * @return {?} + */ + function () { + _this.modelService.edges.delete(edge); + })); + return "break"; + } + }; + var this_1 = this; + try { + for (var _b = __values(this.model.edges), _c = _b.next(); !_c.done; _c = _b.next()) { + var edge = _c.value; + var state_1 = _loop_1(edge); + if (state_1 === "break") + break; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + this.edgeDragging.isDragging = true; + if (swapConnector !== undefined) { + this.draggedEdgeSource = swapConnector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id); + this.edgeDragging.dragLabel = dragLabel; + this.edgeDragging.prevEdge = prevEdge; + } + else { + this.draggedEdgeSource = connector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id); + } + /** @type {?} */ + var canvas = this.modelService.canvasHtmlElement; + if (!canvas) { + throw new Error('No canvas while edgedraggingService found.'); + } + this.dragOffset.x = -canvas.getBoundingClientRect().left; + this.dragOffset.y = -canvas.getBoundingClientRect().top; + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + /** @type {?} */ + var originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + originalEvent.dataTransfer.setData('Text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + this.destinationHtmlElement = (/** @type {?} */ (event.target)); + this.oldDisplayStyle = this.destinationHtmlElement.style.display; + this.destinationHtmlElement.style.display = 'none'; + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.shadowDragStarted = true; + } + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.edgeDragging.gElement === undefined) { + this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class')); + this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path'); + this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle'); + } + this.edgeDragging.gElement.css('display', 'block'); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + event.stopPropagation(); + }; + /** + * @param {?} event + * @return {?} + */ + FcEdgeDraggingService.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (this.edgeDragging.isDragging) { + if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.destinationHtmlElement !== null) { + this.destinationHtmlElement.style.display = this.oldDisplayStyle; + } + if (this.edgeDragging.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + function () { + _this.edgeDragging.shadowDragStarted = false; + })); + } + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + function () { + if (_this.destinationHtmlElement !== null) { + _this.destinationHtmlElement.style.display = _this.oldDisplayStyle; + } + _this.edgeDragging.dragPoint2 = { + x: event.clientX + _this.dragOffset.x, + y: event.clientY + _this.dragOffset.y + }; + })); + } + } + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcEdgeDraggingService.prototype.dragoverConnector = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + event.preventDefault(); + event.stopPropagation(); + return false; + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcEdgeDraggingService.prototype.dragleaveMagnet = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.edgeDragging.magnetActive = false; + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcEdgeDraggingService.prototype.dragoverMagnet = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var _this = this; + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.magnetActive = true; + this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + event.preventDefault(); + event.stopPropagation(); + return false; + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.edgeDragging.dragPoint2 = _this.modelService.connectors.getCenteredCoord(connector.id); + event.preventDefault(); + event.stopPropagation(); + return false; + })); + } + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcEdgeDraggingService.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (this.edgeDragging.isDragging) { + this.edgeDragging.isDragging = false; + this.edgeDragging.dragPoint1 = null; + this.edgeDragging.dragPoint2 = null; + this.edgeDragging.dragLabel = null; + event.stopPropagation(); + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.gElement.css('display', 'none'); + } + if (this.edgeDragging.prevEdge) { + /** @type {?} */ + var edge_1 = this.edgeDragging.prevEdge; + this.edgeDragging.prevEdge = null; + this.applyFunction((/** + * @return {?} + */ + function () { + _this.modelService.edges.putEdge(edge_1); + })); + } + } + }; + /** + * @param {?} event + * @param {?} targetConnector + * @return {?} + */ + FcEdgeDraggingService.prototype.drop = /** + * @param {?} event + * @param {?} targetConnector + * @return {?} + */ + function (event, targetConnector) { + if (this.edgeDragging.isDragging) { + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: targetConnector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) { + this.edgeDragging.prevEdge = null; + this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel); + event.stopPropagation(); + event.preventDefault(); + return false; + } + } + }; + return FcEdgeDraggingService; + }()); + if (false) { + /** @type {?} */ + FcEdgeDraggingService.prototype.edgeDragging; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.draggedEdgeSource; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragOffset; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.destinationHtmlElement; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.oldDisplayStyle; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelValidation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.model; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.isValidEdgeCallback; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.applyFunction; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeStyle; + } + /** + * @record + */ + function EdgeDragging() { } + if (false) { + /** @type {?} */ + EdgeDragging.prototype.isDragging; + /** @type {?} */ + EdgeDragging.prototype.shadowDragStarted; + /** @type {?} */ + EdgeDragging.prototype.dragPoint1; + /** @type {?} */ + EdgeDragging.prototype.dragPoint2; + /** @type {?|undefined} */ + EdgeDragging.prototype.dragLabel; + /** @type {?|undefined} */ + EdgeDragging.prototype.prevEdge; + /** @type {?|undefined} */ + EdgeDragging.prototype.magnetActive; + /** @type {?|undefined} */ + EdgeDragging.prototype.gElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.pathElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.circleElement; + } + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + var FcMouseOverService = /** @class */ (function () { + function FcMouseOverService(applyFunction) { + this.mouseoverscope = { + connector: null, + edge: null, + node: null + }; + this.applyFunction = applyFunction; + } + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + FcMouseOverService.prototype.nodeMouseOver = /** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.node = node; + })); + }; + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + FcMouseOverService.prototype.nodeMouseOut = /** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.node = null; + })); + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcMouseOverService.prototype.connectorMouseEnter = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.connector = connector; + })); + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcMouseOverService.prototype.connectorMouseLeave = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.connector = null; + })); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + FcMouseOverService.prototype.edgeMouseEnter = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverscope.edge = edge; + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + FcMouseOverService.prototype.edgeMouseLeave = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverscope.edge = null; + }; + return FcMouseOverService; + }()); + if (false) { + /** @type {?} */ + FcMouseOverService.prototype.mouseoverscope; + /** + * @type {?} + * @private + */ + FcMouseOverService.prototype.applyFunction; + } + /** + * @record + */ + function MouseOverScope() { } + if (false) { + /** @type {?} */ + MouseOverScope.prototype.connector; + /** @type {?} */ + MouseOverScope.prototype.edge; + /** @type {?} */ + MouseOverScope.prototype.node; + } + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + /** @type {?} */ + var regex = /(auto|scroll)/; + /** @type {?} */ + var style = (/** + * @param {?} node + * @param {?} prop + * @return {?} + */ + function (node, prop) { + return getComputedStyle(node, null).getPropertyValue(prop); + }); + var ɵ0 = style; + /** @type {?} */ + var scroll = (/** + * @param {?} node + * @return {?} + */ + function (node) { + return regex.test(style(node, 'overflow') + + style(node, 'overflow-y') + + style(node, 'overflow-x')); + }); + var ɵ1 = scroll; + /** @type {?} */ + var scrollparent = (/** + * @param {?} node + * @return {?} + */ + function (node) { + return !node || node === document.body + ? document.body + : scroll(node) + ? node + : scrollparent((/** @type {?} */ (node.parentNode))); + }); + var ɵ2 = scrollparent; + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + /** + * @record + */ + function Rectangle() { } + if (false) { + /** @type {?} */ + Rectangle.prototype.x1; + /** @type {?} */ + Rectangle.prototype.x2; + /** @type {?} */ + Rectangle.prototype.y1; + /** @type {?} */ + Rectangle.prototype.y2; + } + var FcRectangleSelectService = /** @class */ (function () { + function FcRectangleSelectService(modelService, selectElement, applyFunction) { + this.selectRect = { + x1: 0, + x2: 0, + y1: 0, + y2: 0 + }; + this.modelService = modelService; + this.selectElement = selectElement; + this.$canvasElement = $(this.modelService.canvasHtmlElement); + this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement)); + this.applyFunction = applyFunction; + } + /** + * @param {?} e + * @return {?} + */ + FcRectangleSelectService.prototype.mousedown = /** + * @param {?} e + * @return {?} + */ + function (e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && this.selectElement.hidden) { + this.selectElement.hidden = false; + /** @type {?} */ + var offset = this.$canvasElement.offset(); + this.selectRect.x1 = Math.round(e.pageX - offset.left); + this.selectRect.y1 = Math.round(e.pageY - offset.top); + this.selectRect.x2 = this.selectRect.x1; + this.selectRect.y2 = this.selectRect.y1; + this.updateSelectRect(); + } + }; + /** + * @param {?} e + * @return {?} + */ + FcRectangleSelectService.prototype.mousemove = /** + * @param {?} e + * @return {?} + */ + function (e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + var offset = this.$canvasElement.offset(); + this.selectRect.x2 = Math.round(e.pageX - offset.left); + this.selectRect.y2 = Math.round(e.pageY - offset.top); + this.updateScroll(offset); + this.updateSelectRect(); + } + }; + /** + * @private + * @param {?} offset + * @return {?} + */ + FcRectangleSelectService.prototype.updateScroll = /** + * @private + * @param {?} offset + * @return {?} + */ + function (offset) { + /** @type {?} */ + var rect = this.$scrollParent[0].getBoundingClientRect(); + /** @type {?} */ + var bottom = rect.bottom - offset.top; + /** @type {?} */ + var right = rect.right - offset.left; + /** @type {?} */ + var top = rect.top - offset.top; + /** @type {?} */ + var left = rect.left - offset.left; + if (this.selectRect.y2 - top < 25) { + /** @type {?} */ + var topScroll = 25 - (this.selectRect.y2 - top); + /** @type {?} */ + var scroll_1 = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll_1 - topScroll); + } + else if (bottom - this.selectRect.y2 < 40) { + /** @type {?} */ + var bottomScroll = 40 - (bottom - this.selectRect.y2); + /** @type {?} */ + var scroll_2 = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll_2 + bottomScroll); + } + if (this.selectRect.x2 - left < 25) { + /** @type {?} */ + var leftScroll = 25 - (this.selectRect.x2 - left); + /** @type {?} */ + var scroll_3 = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll_3 - leftScroll); + } + else if (right - this.selectRect.x2 < 40) { + /** @type {?} */ + var rightScroll = 40 - (right - this.selectRect.x2); + /** @type {?} */ + var scroll_4 = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll_4 + rightScroll); + } + }; + /** + * @param {?} e + * @return {?} + */ + FcRectangleSelectService.prototype.mouseup = /** + * @param {?} e + * @return {?} + */ + function (e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + var rectBox = (/** @type {?} */ (this.selectElement.getBoundingClientRect())); + this.selectElement.hidden = true; + this.selectObjects(rectBox); + } + }; + /** + * @private + * @return {?} + */ + FcRectangleSelectService.prototype.updateSelectRect = /** + * @private + * @return {?} + */ + function () { + /** @type {?} */ + var x3 = Math.min(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + var x4 = Math.max(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + var y3 = Math.min(this.selectRect.y1, this.selectRect.y2); + /** @type {?} */ + var y4 = Math.max(this.selectRect.y1, this.selectRect.y2); + this.selectElement.style.left = x3 + 'px'; + this.selectElement.style.top = y3 + 'px'; + this.selectElement.style.width = x4 - x3 + 'px'; + this.selectElement.style.height = y4 - y3 + 'px'; + }; + /** + * @private + * @param {?} rectBox + * @return {?} + */ + FcRectangleSelectService.prototype.selectObjects = /** + * @private + * @param {?} rectBox + * @return {?} + */ + function (rectBox) { + var _this = this; + this.applyFunction((/** + * @return {?} + */ + function () { + _this.modelService.selectAllInRect(rectBox); + })); + }; + return FcRectangleSelectService; + }()); + if (false) { + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectRect; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$canvasElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$scrollParent; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.applyFunction; + } + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + var NgxFlowchartComponent = /** @class */ (function () { + function NgxFlowchartComponent(elementRef, differs, modelValidation, edgeDrawingService, cd, zone) { + this.elementRef = elementRef; + this.differs = differs; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.cd = cd; + this.zone = zone; + this.flowchartConstants = FlowchartConstants; + this.nodesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + function (index, item) { + return item; + })); + this.edgesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + function (index, item) { + return item; + })); + this.arrowDefId = 'arrow-' + Math.random(); + this.arrowDefIdSelected = this.arrowDefId + '-selected'; + } + Object.defineProperty(NgxFlowchartComponent.prototype, "canvasClass", { + get: /** + * @return {?} + */ + function () { + return FlowchartConstants.canvasClass; + }, + enumerable: true, + configurable: true + }); + /** + * @return {?} + */ + NgxFlowchartComponent.prototype.ngOnInit = /** + * @return {?} + */ + function () { + var e_1, _a; + var _this = this; + if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) { + throw new Error('edgeStyle not supported.'); + } + this.nodeHeight = this.nodeHeight || 200; + this.nodeWidth = this.nodeWidth || 200; + this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint; + this.userCallbacks = this.userCallbacks || {}; + this.automaticResize = this.automaticResize || false; + try { + for (var _b = __values(Object.keys(this.userCallbacks)), _c = _b.next(); !_c.done; _c = _b.next()) { + var key = _c.value; + /** @type {?} */ + var callback = this.userCallbacks[key]; + if (typeof callback !== 'function' && key !== 'nodeCallbacks') { + throw new Error('All callbacks should be functions.'); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + this.userNodeCallbacks = this.userCallbacks.nodeCallbacks; + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects, this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved, this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg')); + if (this.dropTargetId) { + this.modelService.dropTargetId = this.dropTargetId; + } + /** @type {?} */ + var applyFunction = this.zone.run.bind(this.zone); + this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction, this.automaticResize, this.dragAnimation); + this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService, this.model, this.userCallbacks.isValidEdge || null, applyFunction, this.dragAnimation, this.edgeStyle); + this.mouseoverService = new FcMouseOverService(applyFunction); + this.rectangleSelectService = new FcRectangleSelectService(this.modelService, element[0].querySelector('#select-rectangle'), applyFunction); + this.callbacks = { + nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService), + nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService), + edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService), + edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService), + edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService), + edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService), + edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService), + edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService), + nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService), + nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService), + connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService), + connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService), + nodeClicked: (/** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + _this.modelService.nodes.handleClicked(node, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + }) + }; + this.adjustCanvasSize(true); + }; + /** + * @return {?} + */ + NgxFlowchartComponent.prototype.ngDoCheck = /** + * @return {?} + */ + function () { + if (this.model) { + /** @type {?} */ + var nodesChange = this.nodesDiffer.diff(this.model.nodes); + /** @type {?} */ + var edgesChange = this.edgesDiffer.diff(this.model.edges); + /** @type {?} */ + var nodesChanged_1 = false; + /** @type {?} */ + var edgesChanged_1 = false; + if (nodesChange !== null) { + nodesChange.forEachAddedItem((/** + * @return {?} + */ + function () { + nodesChanged_1 = true; + })); + nodesChange.forEachRemovedItem((/** + * @return {?} + */ + function () { + nodesChanged_1 = true; + })); + } + if (edgesChange !== null) { + edgesChange.forEachAddedItem((/** + * @return {?} + */ + function () { + edgesChanged_1 = true; + })); + edgesChange.forEachRemovedItem((/** + * @return {?} + */ + function () { + edgesChanged_1 = true; + })); + } + if (nodesChanged_1) { + this.adjustCanvasSize(true); + } + if (nodesChanged_1 || edgesChanged_1) { + this.cd.detectChanges(); + } + } + }; + /** + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.getEdgeDAttribute = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge), this.modelService.edges.destCoord(edge), this.edgeStyle); + }; + /** + * @param {?=} fit + * @return {?} + */ + NgxFlowchartComponent.prototype.adjustCanvasSize = /** + * @param {?=} fit + * @return {?} + */ + function (fit) { + var _this = this; + /** @type {?} */ + var maxX = 0; + /** @type {?} */ + var maxY = 0; + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + maxX = Math.max(node.x + _this.nodeWidth, maxX); + maxY = Math.max(node.y + _this.nodeHeight, maxY); + })); + /** @type {?} */ + var width; + /** @type {?} */ + var height; + if (fit) { + width = maxX; + height = maxY; + } + else { + width = Math.max(maxX, element.prop('offsetWidth')); + height = Math.max(maxY, element.prop('offsetHeight')); + } + element.css('width', width + 'px'); + element.css('height', height + 'px'); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.canvasClick = /** + * @param {?} event + * @return {?} + */ + function (event) { }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseDown = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + event.stopPropagation(); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeClick = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeRemove = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.modelService.edges.delete(edge); + event.stopPropagation(); + event.preventDefault(); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeEdit = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + if (this.userCallbacks.edgeEdit) { + this.userCallbacks.edgeEdit(event, edge); + } + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeDoubleClick = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + if (this.userCallbacks.edgeDoubleClick) { + this.userCallbacks.edgeDoubleClick(event, edge); + } + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseOver = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + if (this.userCallbacks.edgeMouseOver) { + this.userCallbacks.edgeMouseOver(event, edge); + } + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseEnter = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverService.edgeMouseEnter(event, edge); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseLeave = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverService.edgeMouseLeave(event, edge); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.nodeDraggingService.dragover(event); + this.edgeDraggingService.dragover(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (event.preventDefault) { + event.preventDefault(); + } + if (event.stopPropagation) { + event.stopPropagation(); + } + this.nodeDraggingService.drop(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.mousedown = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.rectangleSelectService.mousedown(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.mousemove = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.rectangleSelectService.mousemove(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.mouseup = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.rectangleSelectService.mouseup(event); + }; + NgxFlowchartComponent.decorators = [ + { type: core.Component, args: [{ + selector: 'fc-canvas', + template: "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {{edgeDraggingService.edgeDragging.dragLabel}}\n
\n
\n \n
\n
\n \n
\n
\n ×\n
\n {{edge.label}}\n
\n
\n \n\n", + changeDetection: core.ChangeDetectionStrategy.OnPush, + styles: [":host{display:block;position:relative;width:100%;height:100%;background-size:25px 25px;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.1) 1px,transparent 1px);background-color:transparent;min-width:100%;min-height:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-canvas-container{display:block;position:relative;width:100%;height:100%}:host .fc-canvas-container svg.fc-canvas-svg{display:block;position:relative;width:100%;height:100%}:host .fc-edge{stroke:gray;stroke-width:4;transition:stroke-width .2s;fill:transparent}:host .fc-edge.fc-hover{stroke:gray;stroke-width:6;fill:transparent}:host .fc-edge.fc-selected{stroke:red;stroke-width:4;fill:transparent}:host .fc-edge.fc-active{-webkit-animation:3s linear infinite dash;animation:3s linear infinite dash;stroke-dasharray:20}:host .fc-edge.fc-dragging{pointer-events:none}:host .fc-arrow-marker polygon{stroke:gray;fill:gray}:host .fc-arrow-marker-selected polygon{stroke:red;fill:red}:host .edge-endpoint{fill:gray}:host .fc-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-edge-label{position:absolute;opacity:.8;transition:transform .2s;transform-origin:bottom left;margin:0 auto}:host .fc-edge-label .fc-edge-label-text{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;text-align:center;font-size:16px}:host .fc-edge-label .fc-edge-label-text span{cursor:default;border:solid #ff3d00;border-radius:10px;color:#ff3d00;background-color:#fff;padding:3px 5px}:host .fc-edge-label .fc-nodeedit{top:-30px;right:14px}:host .fc-edge-label .fc-nodedelete{top:-30px;right:-13px}:host .fc-edge-label.fc-hover{transform:scale(1.25)}:host .fc-edge-label.fc-edit .fc-edge-label-text span,:host .fc-edge-label.fc-selected .fc-edge-label-text span{border:solid red;color:#fff;font-weight:600;background-color:red}:host .fc-select-rectangle{border:2px dashed #5262ff;position:absolute;background:rgba(20,125,255,.1);z-index:2}@-webkit-keyframes dash{from{stroke-dashoffset:500}}@keyframes dash{from{stroke-dashoffset:500}}:host ::ng-deep .fc-nodeedit{display:none;font-size:15px}:host ::ng-deep .fc-nodedelete{display:none;font-size:18px}:host ::ng-deep .fc-edit .fc-nodedelete,:host ::ng-deep .fc-edit .fc-nodeedit{display:block;position:absolute;border:2px solid #eee;border-radius:50%;font-weight:600;line-height:20px;height:20px;padding-top:2px;width:22px;background:#494949;color:#fff;text-align:center;vertical-align:bottom;cursor:pointer}:host ::ng-deep .fc-edit .fc-nodeedit{top:-24px;right:16px}:host ::ng-deep .fc-edit .fc-nodedelete{top:-24px;right:-13px}"] + }] } + ]; + /** @nocollapse */ + NgxFlowchartComponent.ctorParameters = function () { return [ + { type: core.ElementRef }, + { type: core.IterableDiffers }, + { type: FcModelValidationService }, + { type: FcEdgeDrawingService }, + { type: core.ChangeDetectorRef }, + { type: core.NgZone } + ]; }; + NgxFlowchartComponent.propDecorators = { + canvasClass: [{ type: core.HostBinding, args: ['attr.class',] }], + model: [{ type: core.Input }], + selectedObjects: [{ type: core.Input }], + edgeStyle: [{ type: core.Input }], + userCallbacks: [{ type: core.Input }], + automaticResize: [{ type: core.Input }], + dragAnimation: [{ type: core.Input }], + nodeWidth: [{ type: core.Input }], + nodeHeight: [{ type: core.Input }], + dropTargetId: [{ type: core.Input }], + dragover: [{ type: core.HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: core.HostListener, args: ['drop', ['$event'],] }], + mousedown: [{ type: core.HostListener, args: ['mousedown', ['$event'],] }], + mousemove: [{ type: core.HostListener, args: ['mousemove', ['$event'],] }], + mouseup: [{ type: core.HostListener, args: ['mouseup', ['$event'],] }] + }; + return NgxFlowchartComponent; + }()); + if (false) { + /** @type {?} */ + NgxFlowchartComponent.prototype.model; + /** @type {?} */ + NgxFlowchartComponent.prototype.selectedObjects; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeStyle; + /** @type {?} */ + NgxFlowchartComponent.prototype.userCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.automaticResize; + /** @type {?} */ + NgxFlowchartComponent.prototype.dragAnimation; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeWidth; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeHeight; + /** @type {?} */ + NgxFlowchartComponent.prototype.dropTargetId; + /** @type {?} */ + NgxFlowchartComponent.prototype.callbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.userNodeCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.modelService; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.mouseoverService; + /** @type {?} */ + NgxFlowchartComponent.prototype.rectangleSelectService; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefId; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefIdSelected; + /** @type {?} */ + NgxFlowchartComponent.prototype.flowchartConstants; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.nodesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.edgesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.differs; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.modelValidation; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.cd; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.zone; + } /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ - var NgxFlowchartService = /** @class */ (function () { - function NgxFlowchartService() { + var FcMagnetDirective = /** @class */ (function () { + function FcMagnetDirective(elementRef) { + this.elementRef = elementRef; } - NgxFlowchartService.decorators = [ - { type: core.Injectable, args: [{ - providedIn: 'root' + /** + * @return {?} + */ + FcMagnetDirective.prototype.ngOnInit = /** + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.magnetClass); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + return this.callbacks.edgeDragoverMagnet(event, this.connector); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.dragleave = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.callbacks.edgeDragleaveMagnet(event); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + return this.callbacks.edgeDrop(event, this.connector); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.callbacks.edgeDragend(event); + }; + FcMagnetDirective.decorators = [ + { type: core.Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-magnet]' },] } ]; /** @nocollapse */ - NgxFlowchartService.ctorParameters = function () { return []; }; - /** @nocollapse */ NgxFlowchartService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function NgxFlowchartService_Factory() { return new NgxFlowchartService(); }, token: NgxFlowchartService, providedIn: "root" }); - return NgxFlowchartService; + FcMagnetDirective.ctorParameters = function () { return [ + { type: core.ElementRef } + ]; }; + FcMagnetDirective.propDecorators = { + callbacks: [{ type: core.Input }], + connector: [{ type: core.Input }], + dragover: [{ type: core.HostListener, args: ['dragover', ['$event'],] }], + dragleave: [{ type: core.HostListener, args: ['dragleave', ['$event'],] }], + drop: [{ type: core.HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: core.HostListener, args: ['dragend', ['$event'],] }] + }; + return FcMagnetDirective; }()); + if (false) { + /** @type {?} */ + FcMagnetDirective.prototype.callbacks; + /** @type {?} */ + FcMagnetDirective.prototype.connector; + /** @type {?} */ + FcMagnetDirective.prototype.elementRef; + } /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ - var NgxFlowchartComponent = /** @class */ (function () { - function NgxFlowchartComponent() { + var FcConnectorDirective = /** @class */ (function () { + function FcConnectorDirective(elementRef) { + this.elementRef = elementRef; } /** * @return {?} */ - NgxFlowchartComponent.prototype.ngOnInit = /** + FcConnectorDirective.prototype.ngOnInit = /** * @return {?} */ function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.connectorClass); + if (this.modelservice.isEditable()) { + element.attr('draggable', 'true'); + this.updateConnectorClass(); + } + this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]); }; - NgxFlowchartComponent.decorators = [ + /** + * @param {?} changes + * @return {?} + */ + FcConnectorDirective.prototype.ngOnChanges = /** + * @param {?} changes + * @return {?} + */ + function (changes) { + var e_1, _a; + /** @type {?} */ + var updateConnector = false; + try { + for (var _b = __values(Object.keys(changes)), _c = _b.next(); !_c.done; _c = _b.next()) { + var propName = _c.value; + /** @type {?} */ + var change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (propName === 'mouseOverConnector') { + updateConnector = true; + } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (updateConnector && this.modelservice.isEditable()) { + this.updateConnectorClass(); + } + }; + /** + * @private + * @return {?} + */ + FcConnectorDirective.prototype.updateConnectorClass = /** + * @private + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + if (this.connector === this.mouseOverConnector) { + element.addClass(FlowchartConstants.hoverClass); + } + else { + element.removeClass(FlowchartConstants.hoverClass); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + // Skip - conflict with magnet + /* if (this.modelservice.isEditable()) { + return this.callbacks.edgeDragoverConnector(event, this.connector); + }*/ + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + return this.callbacks.edgeDrop(event, this.connector); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragend(event); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.dragstart = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragstart(event, this.connector); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.mouseenter = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseEnter(event, this.connector); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.mouseleave = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseLeave(event, this.connector); + } + }; + FcConnectorDirective.decorators = [ + { type: core.Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-connector]' + },] } + ]; + /** @nocollapse */ + FcConnectorDirective.ctorParameters = function () { return [ + { type: core.ElementRef } + ]; }; + FcConnectorDirective.propDecorators = { + callbacks: [{ type: core.Input }], + modelservice: [{ type: core.Input }], + connector: [{ type: core.Input }], + mouseOverConnector: [{ type: core.Input }], + dragover: [{ type: core.HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: core.HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: core.HostListener, args: ['dragend', ['$event'],] }], + dragstart: [{ type: core.HostListener, args: ['dragstart', ['$event'],] }], + mouseenter: [{ type: core.HostListener, args: ['mouseenter', ['$event'],] }], + mouseleave: [{ type: core.HostListener, args: ['mouseleave', ['$event'],] }] + }; + return FcConnectorDirective; + }()); + if (false) { + /** @type {?} */ + FcConnectorDirective.prototype.callbacks; + /** @type {?} */ + FcConnectorDirective.prototype.modelservice; + /** @type {?} */ + FcConnectorDirective.prototype.connector; + /** @type {?} */ + FcConnectorDirective.prototype.mouseOverConnector; + /** @type {?} */ + FcConnectorDirective.prototype.elementRef; + } + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + var FcNodeContainerComponent = /** @class */ (function () { + function FcNodeContainerComponent(nodeComponentConfig, elementRef, componentFactoryResolver) { + this.nodeComponentConfig = nodeComponentConfig; + this.elementRef = elementRef; + this.componentFactoryResolver = componentFactoryResolver; + } + Object.defineProperty(FcNodeContainerComponent.prototype, "nodeId", { + get: /** + * @return {?} + */ + function () { + return this.node.id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FcNodeContainerComponent.prototype, "top", { + get: /** + * @return {?} + */ + function () { + return this.node.y + 'px'; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FcNodeContainerComponent.prototype, "left", { + get: /** + * @return {?} + */ + function () { + return this.node.x + 'px'; + }, + enumerable: true, + configurable: true + }); + /** + * @return {?} + */ + FcNodeContainerComponent.prototype.ngOnInit = /** + * @return {?} + */ + function () { + if (!this.userNodeCallbacks) { + this.userNodeCallbacks = {}; + } + this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || ((/** + * @return {?} + */ + function () { })); + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.nodeClass); + if (!this.node.readonly) { + element.attr('draggable', 'true'); + } + this.updateNodeClass(); + this.modelservice.nodes.setHtmlElement(this.node.id, element[0]); + this.nodeContentContainer.clear(); + /** @type {?} */ + var componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType); + /** @type {?} */ + var componentRef = this.nodeContentContainer.createComponent(componentFactory); + this.nodeComponent = componentRef.instance; + this.nodeComponent.callbacks = this.callbacks; + this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks; + this.nodeComponent.node = this.node; + this.nodeComponent.modelservice = this.modelservice; + this.updateNodeComponent(); + }; + /** + * @param {?} changes + * @return {?} + */ + FcNodeContainerComponent.prototype.ngOnChanges = /** + * @param {?} changes + * @return {?} + */ + function (changes) { + var e_1, _a; + /** @type {?} */ + var updateNode = false; + try { + for (var _b = __values(Object.keys(changes)), _c = _b.next(); !_c.done; _c = _b.next()) { + var propName = _c.value; + /** @type {?} */ + var change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) { + updateNode = true; + } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (updateNode) { + this.updateNodeClass(); + this.updateNodeComponent(); + } + }; + /** + * @private + * @return {?} + */ + FcNodeContainerComponent.prototype.updateNodeClass = /** + * @private + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + this.toggleClass(element, FlowchartConstants.selectedClass, this.selected); + this.toggleClass(element, FlowchartConstants.editClass, this.edit); + this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse); + this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging); + }; + /** + * @private + * @return {?} + */ + FcNodeContainerComponent.prototype.updateNodeComponent = /** + * @private + * @return {?} + */ + function () { + this.nodeComponent.selected = this.selected; + this.nodeComponent.edit = this.edit; + this.nodeComponent.underMouse = this.underMouse; + this.nodeComponent.mouseOverConnector = this.mouseOverConnector; + this.nodeComponent.dragging = this.dragging; + }; + /** + * @private + * @param {?} element + * @param {?} clazz + * @param {?} set + * @return {?} + */ + FcNodeContainerComponent.prototype.toggleClass = /** + * @private + * @param {?} element + * @param {?} clazz + * @param {?} set + * @return {?} + */ + function (element, clazz, set) { + if (set) { + element.addClass(clazz); + } + else { + element.removeClass(clazz); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.mousedown = /** + * @param {?} event + * @return {?} + */ + function (event) { + event.stopPropagation(); + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.dragstart = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeDragstart(event, this.node); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeDragend(event); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.click = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeClicked(event, this.node); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.mouseover = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOver(event, this.node); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.mouseout = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOut(event, this.node); + } + }; + FcNodeContainerComponent.decorators = [ { type: core.Component, args: [{ - selector: 'fc-canvas', - template: "\n

\n ngx-flowchart works!\n

\n " + selector: 'fc-node', + template: '', + styles: [":host{position:absolute;z-index:1}:host.fc-dragging{z-index:10}:host ::ng-deep .fc-leftConnectors,:host ::ng-deep .fc-rightConnectors{position:absolute;top:0;height:100%;display:flex;flex-direction:column;z-index:-10}:host ::ng-deep .fc-leftConnectors .fc-magnet,:host ::ng-deep .fc-rightConnectors .fc-magnet{align-items:center}:host ::ng-deep .fc-leftConnectors{left:-20px}:host ::ng-deep .fc-rightConnectors{right:-20px}:host ::ng-deep .fc-magnet{display:flex;flex-grow:1;height:60px;justify-content:center}:host ::ng-deep .fc-connector{width:18px;height:18px;border:10px solid transparent;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box;border-radius:50%;background-color:#f7a789;color:#fff;pointer-events:all}:host ::ng-deep .fc-connector.fc-hover{background-color:#000}"] }] } ]; /** @nocollapse */ - NgxFlowchartComponent.ctorParameters = function () { return []; }; - return NgxFlowchartComponent; + FcNodeContainerComponent.ctorParameters = function () { return [ + { type: undefined, decorators: [{ type: core.Inject, args: [FC_NODE_COMPONENT_CONFIG,] }] }, + { type: core.ElementRef }, + { type: core.ComponentFactoryResolver } + ]; }; + FcNodeContainerComponent.propDecorators = { + callbacks: [{ type: core.Input }], + userNodeCallbacks: [{ type: core.Input }], + node: [{ type: core.Input }], + selected: [{ type: core.Input }], + edit: [{ type: core.Input }], + underMouse: [{ type: core.Input }], + mouseOverConnector: [{ type: core.Input }], + modelservice: [{ type: core.Input }], + dragging: [{ type: core.Input }], + nodeId: [{ type: core.HostBinding, args: ['attr.id',] }], + top: [{ type: core.HostBinding, args: ['style.top',] }], + left: [{ type: core.HostBinding, args: ['style.left',] }], + nodeContentContainer: [{ type: core.ViewChild, args: ['nodeContent', { read: core.ViewContainerRef, static: true },] }], + mousedown: [{ type: core.HostListener, args: ['mousedown', ['$event'],] }], + dragstart: [{ type: core.HostListener, args: ['dragstart', ['$event'],] }], + dragend: [{ type: core.HostListener, args: ['dragend', ['$event'],] }], + click: [{ type: core.HostListener, args: ['click', ['$event'],] }], + mouseover: [{ type: core.HostListener, args: ['mouseover', ['$event'],] }], + mouseout: [{ type: core.HostListener, args: ['mouseout', ['$event'],] }] + }; + return FcNodeContainerComponent; + }()); + if (false) { + /** @type {?} */ + FcNodeContainerComponent.prototype.callbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.node; + /** @type {?} */ + FcNodeContainerComponent.prototype.selected; + /** @type {?} */ + FcNodeContainerComponent.prototype.edit; + /** @type {?} */ + FcNodeContainerComponent.prototype.underMouse; + /** @type {?} */ + FcNodeContainerComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeContainerComponent.prototype.modelservice; + /** @type {?} */ + FcNodeContainerComponent.prototype.dragging; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeComponent; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeContentContainer; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.nodeComponentConfig; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.componentFactoryResolver; + } + /** + * @abstract + */ + var FcNodeComponent = /** @class */ (function () { + function FcNodeComponent() { + this.flowchartConstants = FlowchartConstants; + } + /** + * @return {?} + */ + FcNodeComponent.prototype.ngOnInit = /** + * @return {?} + */ + function () { + }; + FcNodeComponent.propDecorators = { + callbacks: [{ type: core.Input }], + userNodeCallbacks: [{ type: core.Input }], + node: [{ type: core.Input }], + selected: [{ type: core.Input }], + edit: [{ type: core.Input }], + underMouse: [{ type: core.Input }], + mouseOverConnector: [{ type: core.Input }], + modelservice: [{ type: core.Input }], + dragging: [{ type: core.Input }] + }; + return FcNodeComponent; }()); + if (false) { + /** @type {?} */ + FcNodeComponent.prototype.callbacks; + /** @type {?} */ + FcNodeComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeComponent.prototype.node; + /** @type {?} */ + FcNodeComponent.prototype.selected; + /** @type {?} */ + FcNodeComponent.prototype.edit; + /** @type {?} */ + FcNodeComponent.prototype.underMouse; + /** @type {?} */ + FcNodeComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeComponent.prototype.modelservice; + /** @type {?} */ + FcNodeComponent.prototype.dragging; + /** @type {?} */ + FcNodeComponent.prototype.flowchartConstants; + } + + /** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ + var DefaultFcNodeComponent = /** @class */ (function (_super) { + __extends(DefaultFcNodeComponent, _super); + function DefaultFcNodeComponent() { + return _super.call(this) || this; + } + DefaultFcNodeComponent.decorators = [ + { type: core.Component, args: [{ + selector: 'fc-default-node', + template: "\n
\n
\n

{{ node.name }}

\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n ×\n
\n\n", + styles: [":host .fc-node-overlay{position:absolute;pointer-events:none;left:0;top:0;right:0;bottom:0;background-color:#000;opacity:0}:host :host-context(.fc-hover) .fc-node-overlay{opacity:.25;transition:opacity .2s}:host :host-context(.fc-selected) .fc-node-overlay{opacity:.25}:host .innerNode{display:flex;justify-content:center;align-items:center;min-width:100px;border-radius:5px;background-color:#f15b26;color:#fff;font-size:16px;pointer-events:none}:host .innerNode p{padding:0 15px;text-align:center}"] + }] } + ]; + /** @nocollapse */ + DefaultFcNodeComponent.ctorParameters = function () { return []; }; + return DefaultFcNodeComponent; + }(FcNodeComponent)); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ + var ɵ0$1 = { + nodeComponentType: DefaultFcNodeComponent + }; var NgxFlowchartModule = /** @class */ (function () { function NgxFlowchartModule() { } NgxFlowchartModule.decorators = [ { type: core.NgModule, args: [{ - declarations: [NgxFlowchartComponent], - imports: [], - exports: [NgxFlowchartComponent] + entryComponents: [ + DefaultFcNodeComponent + ], + declarations: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + FcNodeContainerComponent, + DefaultFcNodeComponent], + providers: [ + FcModelValidationService, + FcEdgeDrawingService, + { + provide: FC_NODE_COMPONENT_CONFIG, + useValue: ɵ0$1 + } + ], + imports: [ + common.CommonModule + ], + exports: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + DefaultFcNodeComponent] },] } ]; return NgxFlowchartModule; }()); + exports.FC_NODE_COMPONENT_CONFIG = FC_NODE_COMPONENT_CONFIG; + exports.FcNodeComponent = FcNodeComponent; + exports.FlowchartConstants = FlowchartConstants; + exports.ModelvalidationError = ModelvalidationError; exports.NgxFlowchartComponent = NgxFlowchartComponent; exports.NgxFlowchartModule = NgxFlowchartModule; - exports.NgxFlowchartService = NgxFlowchartService; + exports.fcTopSort = fcTopSort; + exports.ɵa = FcNodeContainerComponent; + exports.ɵb = FcModelValidationService; + exports.ɵc = FcEdgeDrawingService; + exports.ɵd = DefaultFcNodeComponent; + exports.ɵe = FcMagnetDirective; + exports.ɵf = FcConnectorDirective; Object.defineProperty(exports, '__esModule', { value: true }); diff --git a/dist/ngx-flowchart/bundles/ngx-flowchart.umd.js.map b/dist/ngx-flowchart/bundles/ngx-flowchart.umd.js.map index 4c91fdb..7fcd2f1 100644 --- a/dist/ngx-flowchart/bundles/ngx-flowchart.umd.js.map +++ b/dist/ngx-flowchart/bundles/ngx-flowchart.umd.js.map @@ -1 +1 @@ -{"version":3,"file":"ngx-flowchart.umd.js","sources":["ng://ngx-flowchart/lib/ngx-flowchart.service.ts","ng://ngx-flowchart/lib/ngx-flowchart.component.ts","ng://ngx-flowchart/lib/ngx-flowchart.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxFlowchartService {\n\n constructor() { }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'fc-canvas',\n template: `\n

\n ngx-flowchart works!\n

\n `,\n styles: []\n})\nexport class NgxFlowchartComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { NgxFlowchartComponent } from './ngx-flowchart.component';\n\n@NgModule({\n declarations: [NgxFlowchartComponent],\n imports: [\n ],\n exports: [NgxFlowchartComponent]\n})\nexport class NgxFlowchartModule { }\n"],"names":["Injectable","Component","NgModule"],"mappings":";;;;;;;;;;AAAA;QAOE;SAAiB;;oBALlBA,eAAU,SAAC;wBACV,UAAU,EAAE,MAAM;qBACnB;;;;;kCAJD;KAEA;;;;;;ACFA;QAaE;SAAiB;;;;QAEjB,wCAAQ;;;QAAR;SACC;;oBAdFC,cAAS,SAAC;wBACT,QAAQ,EAAE,WAAW;wBACrB,QAAQ,EAAE,qDAIT;qBAEF;;;;QAQD,4BAAC;KAhBD;;;;;;ACFA;QAGA;SAMmC;;oBANlCC,aAAQ,SAAC;wBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;wBACrC,OAAO,EAAE,EACR;wBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;qBACjC;;QACiC,yBAAC;KANnC;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"ngx-flowchart.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","ng://ngx-flowchart/lib/ngx-flowchart.models.ts","ng://ngx-flowchart/lib/model.service.ts","ng://ngx-flowchart/lib/modelvalidation.service.ts","ng://ngx-flowchart/lib/node-dragging.service.ts","ng://ngx-flowchart/lib/edge-drawing.service.ts","ng://ngx-flowchart/lib/edge-dragging.service.ts","ng://ngx-flowchart/lib/mouseover.service.ts","ng://ngx-flowchart/lib/scrollparent.ts","ng://ngx-flowchart/lib/rectangleselect.service.ts","ng://ngx-flowchart/lib/ngx-flowchart.component.ts","ng://ngx-flowchart/lib/magnet.directive.ts","ng://ngx-flowchart/lib/connector.directive.ts","ng://ngx-flowchart/lib/node.component.ts","ng://ngx-flowchart/lib/default-node.component.ts","ng://ngx-flowchart/lib/ngx-flowchart.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Observable } from 'rxjs';\nimport { InjectionToken, Type } from '@angular/core';\nimport { FcNodeComponent } from './node.component';\n\nexport const FC_NODE_COMPONENT_CONFIG = new InjectionToken('fc-node.component.config');\n\nexport interface FcNodeComponentConfig {\n nodeComponentType: Type;\n}\n\nconst htmlPrefix = 'fc';\nconst leftConnectorType = 'leftConnector';\nconst rightConnectorType = 'rightConnector';\n\nexport const FlowchartConstants = {\n htmlPrefix,\n leftConnectorType,\n rightConnectorType,\n curvedStyle: 'curved',\n lineStyle: 'line',\n dragAnimationRepaint: 'repaint',\n dragAnimationShadow: 'shadow',\n canvasClass: htmlPrefix + '-canvas',\n selectedClass: htmlPrefix + '-selected',\n editClass: htmlPrefix + '-edit',\n activeClass: htmlPrefix + '-active',\n hoverClass: htmlPrefix + '-hover',\n draggingClass: htmlPrefix + '-dragging',\n edgeClass: htmlPrefix + '-edge',\n edgeLabelClass: htmlPrefix + '-edge-label',\n connectorClass: htmlPrefix + '-connector',\n magnetClass: htmlPrefix + '-magnet',\n nodeClass: htmlPrefix + '-node',\n nodeOverlayClass: htmlPrefix + '-node-overlay',\n leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's',\n rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's',\n canvasResizeThreshold: 200,\n canvasResizeStep: 200\n};\n\n\nexport interface FcCoords {\n x?: number;\n y?: number;\n}\n\nexport interface FcOffset {\n top: number;\n left: number;\n}\n\nexport interface FcRectBox {\n top: number;\n left: number;\n right: number;\n bottom: number;\n}\n\nexport interface FcConnector {\n id: string;\n type: string;\n}\n\nexport interface FcNode extends FcCoords {\n id: string;\n name: string;\n connectors: Array;\n readonly?: boolean;\n [key: string]: any;\n}\n\nexport interface FcEdge {\n label?: string;\n source?: string;\n destination?: string;\n active?: boolean;\n}\n\nexport interface FcItemInfo {\n node?: FcNode;\n edge?: FcEdge;\n}\n\nexport interface FcModel {\n nodes: Array;\n edges: Array;\n}\n\nexport interface UserCallbacks {\n dropNode?: (event: Event, node: FcNode) => void;\n createEdge?: (event: Event, edge: FcEdge) => Observable;\n edgeAdded?: (edge: FcEdge) => void;\n nodeRemoved?: (node: FcNode) => void;\n edgeRemoved?: (edge: FcEdge) => void;\n edgeDoubleClick?: (event: MouseEvent, edge: FcEdge) => void;\n edgeMouseOver?: (event: MouseEvent, edge: FcEdge) => void;\n isValidEdge?: (source: FcConnector, destination: FcConnector) => boolean;\n edgeEdit?: (event: Event, edge: FcEdge) => void;\n nodeCallbacks?: UserNodeCallbacks;\n}\n\nexport interface UserNodeCallbacks {\n nodeEdit?: (event: MouseEvent, node: FcNode) => void;\n doubleClick?: (event: MouseEvent, node: FcNode) => void;\n mouseDown?: (event: MouseEvent, node: FcNode) => void;\n mouseEnter?: (event: MouseEvent, node: FcNode) => void;\n mouseLeave?: (event: MouseEvent, node: FcNode) => void;\n}\n\nexport interface FcCallbacks {\n nodeDragstart: (event: DragEvent, node: FcNode) => void;\n nodeDragend: (event: DragEvent) => void;\n edgeDragstart: (event: DragEvent, connector: FcConnector) => void;\n edgeDragend: (event: DragEvent) => void;\n edgeDrop: (event: DragEvent, targetConnector: FcConnector) => boolean;\n edgeDragoverConnector: (event: DragEvent, connector: FcConnector) => boolean;\n edgeDragoverMagnet: (event: DragEvent, connector: FcConnector) => boolean;\n edgeDragleaveMagnet: (event: DragEvent) => void;\n nodeMouseOver: (event: MouseEvent, node: FcNode) => void;\n nodeMouseOut: (event: MouseEvent, node: FcNode) => void;\n connectorMouseEnter: (event: MouseEvent, connector: FcConnector) => void;\n connectorMouseLeave: (event: MouseEvent, connector: FcConnector) => void;\n nodeClicked: (event: MouseEvent, node: FcNode) => void;\n}\n\nexport interface FcAdjacentList {\n [id: string]: {\n incoming: number;\n outgoing: Array;\n };\n}\n\nexport class ModelvalidationError extends Error {\n constructor(message: string) {\n super(message);\n }\n}\n\nexport function fcTopSort(graph: FcModel): Array | null {\n const adjacentList: FcAdjacentList = {};\n graph.nodes.forEach((node) => {\n adjacentList[node.id] = {incoming: 0, outgoing: []};\n });\n graph.edges.forEach((edge) => {\n const sourceNode = graph.nodes.filter((node) => {\n return node.connectors.some((connector) => {\n return connector.id === edge.source;\n });\n })[0];\n const destinationNode = graph.nodes.filter((node) => {\n return node.connectors.some((connector) => {\n return connector.id === edge.destination;\n });\n })[0];\n adjacentList[sourceNode.id].outgoing.push(destinationNode.id);\n adjacentList[destinationNode.id].incoming++;\n });\n const orderedNodes: string[] = [];\n const sourceNodes: string[] = [];\n for (const node of Object.keys(adjacentList)) {\n const edges = adjacentList[node];\n if (edges.incoming === 0) {\n sourceNodes.push(node);\n }\n }\n while (sourceNodes.length !== 0) {\n const sourceNode = sourceNodes.pop();\n for (let i = 0; i < adjacentList[sourceNode].outgoing.length; i++) {\n const destinationNode = adjacentList[sourceNode].outgoing[i];\n adjacentList[destinationNode].incoming--;\n if (adjacentList[destinationNode].incoming === 0) {\n sourceNodes.push(destinationNode);\n }\n adjacentList[sourceNode].outgoing.splice(i, 1);\n i--;\n }\n orderedNodes.push(sourceNode);\n }\n let hasEdges = false;\n for (const node of Object.keys(adjacentList)) {\n const edges = adjacentList[node];\n if (edges.incoming !== 0) {\n hasEdges = true;\n }\n }\n if (hasEdges) {\n return null;\n } else {\n return orderedNodes;\n }\n}\n","import { FcModelValidationService } from './modelvalidation.service';\nimport { FcConnector, FcCoords, FcEdge, FcItemInfo, FcModel, FcNode, FcRectBox } from './ngx-flowchart.models';\nimport { Observable, of } from 'rxjs';\nimport { ChangeDetectorRef } from '@angular/core';\n\nexport class FcModelService {\n\n modelValidation: FcModelValidationService;\n model: FcModel;\n cd: ChangeDetectorRef;\n selectedObjects: any[];\n\n connectorsHtmlElements: HtmlElementMap = {};\n nodesHtmlElements: HtmlElementMap = {};\n canvasHtmlElement: HTMLElement = null;\n dragImage: HTMLImageElement = null;\n svgHtmlElement: SVGElement = null;\n\n dropNode: (event: Event, node: FcNode) => void;\n createEdge: (event: Event, edge: FcEdge) => Observable;\n edgeAddedCallback: (edge: FcEdge) => void;\n nodeRemovedCallback: (node: FcNode) => void;\n edgeRemovedCallback: (edge: FcEdge) => void;\n\n dropTargetId: string;\n\n connectors: ConnectorsModel;\n nodes: NodesModel;\n edges: EdgesModel;\n\n constructor(modelValidation: FcModelValidationService,\n model: FcModel,\n cd: ChangeDetectorRef,\n selectedObjects: any[],\n dropNode: (event: Event, node: FcNode) => void,\n createEdge: (event: Event, edge: FcEdge) => Observable,\n edgeAddedCallback: (edge: FcEdge) => void,\n nodeRemovedCallback: (node: FcNode) => void,\n edgeRemovedCallback: (edge: FcEdge) => void,\n canvasHtmlElement: HTMLElement,\n svgHtmlElement: SVGElement) {\n\n this.modelValidation = modelValidation;\n this.model = model;\n this.cd = cd;\n this.canvasHtmlElement = canvasHtmlElement;\n this.svgHtmlElement = svgHtmlElement;\n this.modelValidation.validateModel(this.model);\n this.selectedObjects = selectedObjects;\n\n this.dropNode = dropNode || (() => {});\n this.createEdge = createEdge || (() => of({label: 'label'}));\n this.edgeAddedCallback = edgeAddedCallback || (() => {});\n this.nodeRemovedCallback = nodeRemovedCallback || (() => {});\n this.edgeRemovedCallback = edgeRemovedCallback || (() => {});\n\n this.connectors = new ConnectorsModel(this);\n this.nodes = new NodesModel(this);\n this.edges = new EdgesModel(this);\n }\n\n public detectChanges() {\n setTimeout(() => {\n this.cd.detectChanges();\n }, 0);\n }\n\n public selectObject(object: any) {\n if (this.isEditable()) {\n if (this.selectedObjects.indexOf(object) === -1) {\n this.selectedObjects.push(object);\n }\n }\n }\n\n public deselectObject(object: any) {\n if (this.isEditable()) {\n const index = this.selectedObjects.indexOf(object);\n if (index === -1) {\n throw new Error('Tried to deselect an unselected object');\n }\n this.selectedObjects.splice(index, 1);\n }\n }\n\n public toggleSelectedObject(object: any) {\n if (this.isSelectedObject(object)) {\n this.deselectObject(object);\n } else {\n this.selectObject(object);\n }\n }\n\n public isSelectedObject(object: any): boolean {\n return this.selectedObjects.indexOf(object) !== -1;\n }\n\n public selectAll() {\n this.model.nodes.forEach(node => {\n if (!node.readonly) {\n this.nodes.select(node);\n }\n });\n this.model.edges.forEach(edge => {\n this.edges.select(edge);\n });\n this.detectChanges();\n }\n\n public deselectAll() {\n this.selectedObjects.splice(0, this.selectedObjects.length);\n this.detectChanges();\n }\n\n public isEditObject(object: any): boolean {\n return this.selectedObjects.length === 1 &&\n this.selectedObjects.indexOf(object) !== -1;\n }\n\n private inRectBox(x: number, y: number, rectBox: FcRectBox): boolean {\n return x >= rectBox.left && x <= rectBox.right &&\n y >= rectBox.top && y <= rectBox.bottom;\n }\n\n public getItemInfoAtPoint(x: number, y: number): FcItemInfo {\n return {\n node: this.getNodeAtPoint(x, y),\n edge: this.getEdgeAtPoint(x, y)\n };\n }\n\n public getNodeAtPoint(x: number, y: number): FcNode {\n for (const node of this.model.nodes) {\n const element = this.nodes.getHtmlElement(node.id);\n const nodeElementBox = element.getBoundingClientRect();\n if (x >= nodeElementBox.left && x <= nodeElementBox.right\n && y >= nodeElementBox.top && y <= nodeElementBox.bottom) {\n return node;\n }\n }\n return null;\n }\n\n public getEdgeAtPoint(x: number, y: number): FcEdge {\n const element = document.elementFromPoint(x, y);\n const id = element.id;\n let edgeIndex = -1;\n if (id) {\n if (id.startsWith('fc-edge-path-')) {\n edgeIndex = Number(id.substring('fc-edge-path-'.length));\n } else if (id.startsWith('fc-edge-label-')) {\n edgeIndex = Number(id.substring('fc-edge-label-'.length));\n }\n }\n if (edgeIndex > -1) {\n return this.model.edges[edgeIndex];\n }\n return null;\n }\n\n public selectAllInRect(rectBox: FcRectBox) {\n this.model.nodes.forEach((value) => {\n const element = this.nodes.getHtmlElement(value.id);\n const nodeElementBox = element.getBoundingClientRect();\n if (!value.readonly) {\n const x = nodeElementBox.left + nodeElementBox.width / 2;\n const y = nodeElementBox.top + nodeElementBox.height / 2;\n if (this.inRectBox(x, y, rectBox)) {\n this.nodes.select(value);\n } else {\n if (this.nodes.isSelected(value)) {\n this.nodes.deselect(value);\n }\n }\n }\n });\n const canvasElementBox = this.canvasHtmlElement.getBoundingClientRect();\n this.model.edges.forEach((value) => {\n const start = this.edges.sourceCoord(value);\n const end = this.edges.destCoord(value);\n const x = (start.x + end.x) / 2 + canvasElementBox.left;\n const y = (start.y + end.y) / 2 + canvasElementBox.top;\n if (this.inRectBox(x, y, rectBox)) {\n this.edges.select(value);\n } else {\n if (this.edges.isSelected(value)) {\n this.edges.deselect(value);\n }\n }\n });\n }\n\n public deleteSelected() {\n const edgesToDelete = this.edges.getSelectedEdges();\n edgesToDelete.forEach((edge) => {\n this.edges.delete(edge);\n });\n const nodesToDelete = this.nodes.getSelectedNodes();\n nodesToDelete.forEach((node) => {\n this.nodes.delete(node);\n });\n }\n\n public isEditable(): boolean {\n return this.dropTargetId === undefined;\n }\n\n public isDropSource(): boolean {\n return this.dropTargetId !== undefined;\n }\n\n public getDragImage(): HTMLImageElement {\n if (!this.dragImage) {\n this.dragImage = new Image();\n this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n this.dragImage.style.visibility = 'hidden';\n }\n return this.dragImage;\n }\n\n public registerCallbacks(edgeAddedCallback: (edge: FcEdge) => void,\n nodeRemovedCallback: (node: FcNode) => void,\n edgeRemovedCallback: (edge: FcEdge) => void) {\n this.edgeAddedCallback = edgeAddedCallback;\n this.nodeRemovedCallback = nodeRemovedCallback;\n this.edgeRemovedCallback = edgeRemovedCallback;\n }\n\n}\n\ninterface HtmlElementMap { [id: string]: HTMLElement; }\n\nabstract class AbstractFcModel {\n\n modelService: FcModelService;\n\n protected constructor(modelService: FcModelService) {\n this.modelService = modelService;\n }\n\n public select(object: T) {\n this.modelService.selectObject(object);\n }\n\n public deselect(object: T) {\n this.modelService.deselectObject(object);\n }\n\n public toggleSelected(object: T) {\n this.modelService.toggleSelectedObject(object);\n }\n\n public isSelected(object: T): boolean {\n return this.modelService.isSelectedObject(object);\n }\n\n public isEdit(object: T): boolean {\n return this.modelService.isEditObject(object);\n }\n}\n\nclass ConnectorsModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public getConnector(connectorId: string): FcConnector {\n const model = this.modelService.model;\n for (const node of model.nodes) {\n for (const connector of node.connectors) {\n if (connector.id === connectorId) {\n return connector;\n }\n }\n }\n }\n\n public getHtmlElement(connectorId: string): HTMLElement {\n return this.modelService.connectorsHtmlElements[connectorId];\n }\n\n public setHtmlElement(connectorId: string, element: HTMLElement) {\n this.modelService.connectorsHtmlElements[connectorId] = element;\n this.modelService.detectChanges();\n }\n\n private _getCoords(connectorId: string, centered?: boolean): FcCoords {\n const element = this.getHtmlElement(connectorId);\n const canvas = this.modelService.canvasHtmlElement;\n if (element === null || element === undefined || canvas === null) {\n return {x: 0, y: 0};\n }\n const connectorElementBox = element.getBoundingClientRect();\n const canvasElementBox = canvas.getBoundingClientRect();\n let coords: FcCoords = {\n x: connectorElementBox.left - canvasElementBox.left,\n y: connectorElementBox.top - canvasElementBox.top\n };\n if (centered) {\n coords = {\n x: Math.round(coords.x + element.offsetWidth / 2),\n y: Math.round(coords.y + element.offsetHeight / 2)\n };\n }\n return coords;\n }\n\n public getCoords(connectorId: string): FcCoords {\n return this._getCoords(connectorId, false);\n }\n\n public getCenteredCoord(connectorId: string): FcCoords {\n return this._getCoords(connectorId, true);\n }\n}\n\nclass NodesModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public getConnectorsByType(node: FcNode, type: string): Array {\n return node.connectors.filter((connector) => {\n return connector.type === type;\n });\n }\n\n private _addConnector(node: FcNode, connector: FcConnector) {\n node.connectors.push(connector);\n try {\n this.modelService.modelValidation.validateNode(node);\n } catch (error) {\n node.connectors.splice(node.connectors.indexOf(connector), 1);\n throw error;\n }\n }\n\n public delete(node: FcNode) {\n if (this.isSelected(node)) {\n this.deselect(node);\n }\n const model = this.modelService.model;\n const index = model.nodes.indexOf(node);\n if (index === -1) {\n if (node === undefined) {\n throw new Error('Passed undefined');\n }\n throw new Error('Tried to delete not existing node');\n }\n const connectorIds = this.getConnectorIds(node);\n for (let i = 0; i < model.edges.length; i++) {\n const edge = model.edges[i];\n if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) {\n this.modelService.edges.delete(edge);\n i--;\n }\n }\n model.nodes.splice(index, 1);\n this.modelService.nodeRemovedCallback(node);\n }\n\n public getSelectedNodes(): Array {\n const model = this.modelService.model;\n return model.nodes.filter((node) => {\n return this.modelService.nodes.isSelected(node);\n });\n }\n\n public handleClicked(node: FcNode, ctrlKey?: boolean) {\n if (ctrlKey) {\n this.modelService.nodes.toggleSelected(node);\n } else {\n this.modelService.deselectAll();\n this.modelService.nodes.select(node);\n }\n }\n\n private _addNode(node: FcNode) {\n const model = this.modelService.model;\n try {\n model.nodes.push(node);\n this.modelService.modelValidation.validateNodes(model.nodes);\n } catch (error) {\n model.nodes.splice(model.nodes.indexOf(node), 1);\n throw error;\n }\n }\n\n public getConnectorIds(node: FcNode): Array {\n return node.connectors.map((connector) => {\n return connector.id;\n });\n }\n\n public getNodeByConnectorId(connectorId: string): FcNode {\n const model = this.modelService.model;\n for (const node of model.nodes) {\n const connectorIds = this.getConnectorIds(node);\n if (connectorIds.indexOf(connectorId) > -1) {\n return node;\n }\n }\n return null;\n }\n\n public getHtmlElement(nodeId: string): HTMLElement {\n return this.modelService.nodesHtmlElements[nodeId];\n }\n\n public setHtmlElement(nodeId: string, element: HTMLElement) {\n this.modelService.nodesHtmlElements[nodeId] = element;\n this.modelService.detectChanges();\n }\n\n}\n\nclass EdgesModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public ready(edge: FcEdge): boolean {\n const source = this.modelService.connectors.getHtmlElement(edge.source);\n const destination = this.modelService.connectors.getHtmlElement(edge.destination);\n return source !== undefined && destination !== undefined;\n }\n\n public sourceCoord(edge: FcEdge): FcCoords {\n return this.modelService.connectors.getCenteredCoord(edge.source);\n }\n\n public destCoord(edge: FcEdge): FcCoords {\n return this.modelService.connectors.getCenteredCoord(edge.destination);\n }\n\n public delete(edge: FcEdge) {\n const model = this.modelService.model;\n const index = model.edges.indexOf(edge);\n if (index === -1) {\n throw new Error('Tried to delete not existing edge');\n }\n if (this.isSelected(edge)) {\n this.deselect(edge);\n }\n model.edges.splice(index, 1);\n this.modelService.edgeRemovedCallback(edge);\n }\n\n public getSelectedEdges(): Array {\n const model = this.modelService.model;\n return model.edges.filter((edge) => {\n return this.modelService.edges.isSelected(edge);\n });\n }\n\n public handleEdgeMouseClick(edge: FcEdge, ctrlKey?: boolean) {\n if (ctrlKey) {\n this.modelService.edges.toggleSelected(edge);\n } else {\n this.modelService.deselectAll();\n this.modelService.edges.select(edge);\n }\n }\n\n public putEdge(edge: FcEdge) {\n const model = this.modelService.model;\n model.edges.push(edge);\n }\n\n public _addEdge(event: Event, sourceConnector: FcConnector, destConnector: FcConnector, label: string) {\n this.modelService.modelValidation.validateConnector(sourceConnector);\n this.modelService.modelValidation.validateConnector(destConnector);\n const edge: FcEdge = {};\n edge.source = sourceConnector.id;\n edge.destination = destConnector.id;\n edge.label = label;\n const model = this.modelService.model;\n this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes);\n this.modelService.createEdge(event, edge).subscribe(\n (created) => {\n model.edges.push(created);\n this.modelService.edgeAddedCallback(created);\n }\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { FcConnector, FcEdge, FcModel, FcNode, fcTopSort, ModelvalidationError } from './ngx-flowchart.models';\n\n@Injectable()\nexport class FcModelValidationService {\n\n constructor() { }\n\n public validateModel(model: FcModel): FcModel {\n this.validateNodes(model.nodes);\n this._validateEdges(model.edges, model.nodes);\n return model;\n }\n\n public validateNodes(nodes: Array): Array {\n const ids: string[] = [];\n nodes.forEach((node) => {\n this.validateNode(node);\n if (ids.indexOf(node.id) !== -1) {\n throw new ModelvalidationError('Id not unique.');\n }\n ids.push(node.id);\n });\n const connectorIds: string[] = [];\n nodes.forEach((node) => {\n node.connectors.forEach((connector) => {\n if (connectorIds.indexOf(connector.id) !== -1) {\n throw new ModelvalidationError('Id not unique.');\n }\n connectorIds.push(connector.id);\n });\n });\n return nodes;\n }\n\n public validateNode(node: FcNode): FcNode {\n if (node.id === undefined) {\n throw new ModelvalidationError('Id not valid.');\n }\n if (typeof node.name !== 'string') {\n throw new ModelvalidationError('Name not valid.');\n }\n if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) {\n throw new ModelvalidationError('Coordinates not valid.');\n }\n if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) {\n throw new ModelvalidationError('Coordinates not valid.');\n }\n if (!Array.isArray(node.connectors)) {\n throw new ModelvalidationError('Connectors not valid.');\n }\n node.connectors.forEach((connector) => {\n this.validateConnector(connector);\n });\n return node;\n }\n\n private _validateEdges(edges: Array, nodes: Array): Array {\n edges.forEach((edge) => {\n this._validateEdge(edge, nodes);\n });\n edges.forEach((edge1, index1) => {\n edges.forEach((edge2, index2) => {\n if (index1 !== index2) {\n if ((edge1.source === edge2.source && edge1.destination === edge2.destination) ||\n (edge1.source === edge2.destination && edge1.destination === edge2.source)) {\n throw new ModelvalidationError('Duplicated edge.');\n }\n }\n });\n });\n if (fcTopSort({nodes, edges}) === null) {\n throw new ModelvalidationError('Graph has a circle.');\n }\n return edges;\n }\n\n public validateEdges(edges: Array, nodes: Array): Array {\n this.validateNodes(nodes);\n return this._validateEdges(edges, nodes);\n }\n\n private _validateEdge(edge: FcEdge, nodes: Array): FcEdge {\n if (edge.source === undefined) {\n throw new ModelvalidationError('Source not valid.');\n }\n if (edge.destination === undefined) {\n throw new ModelvalidationError('Destination not valid.');\n }\n if (edge.source === edge.destination) {\n throw new ModelvalidationError('Edge with same source and destination connectors.');\n }\n const sourceNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.source))[0];\n if (sourceNode === undefined) {\n throw new ModelvalidationError('Source not valid.');\n }\n const destinationNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.destination))[0];\n if (destinationNode === undefined) {\n throw new ModelvalidationError('Destination not valid.');\n }\n if (sourceNode === destinationNode) {\n throw new ModelvalidationError('Edge with same source and destination nodes.');\n }\n return edge;\n }\n\n public validateEdge(edge: FcEdge, nodes: Array): FcEdge {\n this.validateNodes(nodes);\n return this._validateEdge(edge, nodes);\n }\n\n public validateConnector(connector: FcConnector): FcConnector {\n if (connector.id === undefined) {\n throw new ModelvalidationError('Id not valid.');\n }\n if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') {\n throw new ModelvalidationError('Type not valid.');\n }\n return connector;\n }\n\n}\n","import { FcModelService } from './model.service';\nimport { FcCoords, FcNode, FlowchartConstants } from './ngx-flowchart.models';\n\nconst nodeDropScope: NodeDropScope = {\n dropElement: null\n};\n\nexport class FcNodeDraggingService {\n\n nodeDraggingScope: NodeDraggingScope = {\n shadowDragStarted: false,\n dropElement: null,\n draggedNodes: [],\n shadowElements: []\n };\n\n private dragOffsets: FcCoords[] = [];\n private draggedElements: HTMLElement[] = [];\n\n private destinationHtmlElements: HTMLElement[] = [];\n private oldDisplayStyles: string[] = [];\n\n private readonly modelService: FcModelService;\n private readonly automaticResize: boolean;\n private readonly dragAnimation: string;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(modelService: FcModelService,\n applyFunction: (fn: (...args: any[]) => T) => T,\n automaticResize: boolean, dragAnimation: string) {\n this.modelService = modelService;\n this.automaticResize = automaticResize;\n this.dragAnimation = dragAnimation;\n this.applyFunction = applyFunction;\n }\n\n private getCoordinate(coordinate: number, max: number): number {\n coordinate = Math.max(coordinate, 0);\n coordinate = Math.min(coordinate, max);\n return coordinate;\n }\n\n private getXCoordinate(x: number): number {\n return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth);\n }\n\n private getYCoordinate(y: number): number {\n return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight);\n }\n\n private resizeCanvas(draggedNode: FcNode, nodeElement: HTMLElement) {\n if (this.automaticResize && !this.modelService.isDropSource()) {\n const canvasElement = this.modelService.canvasHtmlElement;\n if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) {\n canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px';\n }\n if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) {\n canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px';\n }\n }\n }\n\n public isDraggingNode(node: FcNode): boolean {\n return this.nodeDraggingScope.draggedNodes.includes(node);\n }\n\n public dragstart(event: DragEvent, node: FcNode) {\n if (node.readonly) {\n return;\n }\n this.dragOffsets.length = 0;\n this.draggedElements.length = 0;\n this.nodeDraggingScope.draggedNodes.length = 0;\n this.nodeDraggingScope.shadowElements.length = 0;\n this.destinationHtmlElements.length = 0;\n this.oldDisplayStyles.length = 0;\n const elements: Array> = [];\n const nodes: Array = [];\n if (this.modelService.nodes.isSelected(node)) {\n const selectedNodes = this.modelService.nodes.getSelectedNodes();\n for (const selectedNode of selectedNodes) {\n const element = $(this.modelService.nodes.getHtmlElement(selectedNode.id));\n elements.push(element);\n nodes.push(selectedNode);\n }\n } else {\n elements.push($(event.target as HTMLElement));\n nodes.push(node);\n }\n const offsetsX: number[] = [];\n const offsetsY: number[] = [];\n for (const element of elements) {\n offsetsX.push(parseInt(element.css('left'), 10) - event.clientX);\n offsetsY.push(parseInt(element.css('top'), 10) - event.clientY);\n }\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n if (this.modelService.isDropSource()) {\n if (nodeDropScope.dropElement) {\n nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement);\n nodeDropScope.dropElement = null;\n }\n nodeDropScope.dropElement = elements[0][0].cloneNode(true) as NodeDropElement;\n const offset = $(this.modelService.canvasHtmlElement).offset();\n nodeDropScope.dropElement.offsetInfo = {\n offsetX: Math.round(offsetsX[0] + offset.left),\n offsetY: Math.round(offsetsY[0] + offset.top)\n };\n nodeDropScope.dropElement.style.position = 'absolute';\n nodeDropScope.dropElement.style.pointerEvents = 'none';\n nodeDropScope.dropElement.style.zIndex = '9999';\n\n document.body.appendChild(nodeDropScope.dropElement);\n const dropNodeInfo: DropNodeInfo = {\n node,\n dropTargetId: this.modelService.dropTargetId,\n offsetX: Math.round(offsetsX[0] + offset.left),\n offsetY: Math.round(offsetsY[0] + offset.top)\n };\n originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo));\n\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n const target: HTMLElement = event.target as HTMLElement;\n this.destinationHtmlElements.push(target);\n this.oldDisplayStyles.push(target.style.display);\n target.style.display = 'none';\n this.nodeDraggingScope.shadowDragStarted = true;\n }\n return;\n }\n this.nodeDraggingScope.draggedNodes = nodes;\n for (let i = 0; i < elements.length; i++) {\n this.draggedElements.push(elements[i][0]);\n this.dragOffsets.push(\n {\n x: offsetsX[i],\n y: offsetsY[i]\n }\n );\n }\n\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n for (let i = 0; i < this.draggedElements.length; i++) {\n const dragOffset = this.dragOffsets[i];\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const shadowElement = $(`
` +\n `

${draggedNode.name}

`);\n const targetInnerNode = $(this.draggedElements[i]).children()[0];\n shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor;\n this.nodeDraggingScope.shadowElements.push(shadowElement);\n this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]);\n }\n }\n originalEvent.dataTransfer.setData('text', 'Just to support firefox');\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n for (let i = 0; i < this.draggedElements.length; i++) {\n this.destinationHtmlElements.push(this.draggedElements[i]);\n this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);\n this.destinationHtmlElements[i].style.display = 'none';\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.nodeDraggingScope.shadowDragStarted = true;\n }\n }\n }\n\n public drop(event: DragEvent): boolean {\n if (this.modelService.isDropSource()) {\n event.preventDefault();\n return false;\n }\n let dropNode: FcNode = null;\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n const infoText = originalEvent.dataTransfer.getData('text');\n if (infoText) {\n let dropNodeInfo: DropNodeInfo = null;\n try {\n dropNodeInfo = JSON.parse(infoText);\n } catch (e) {}\n if (dropNodeInfo && dropNodeInfo.dropTargetId) {\n if (this.modelService.canvasHtmlElement.id &&\n this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) {\n dropNode = dropNodeInfo.node;\n const offset = $(this.modelService.canvasHtmlElement).offset();\n const x = event.clientX - offset.left;\n const y = event.clientY - offset.top;\n dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x));\n dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y));\n }\n }\n }\n if (dropNode) {\n this.modelService.dropNode(event, dropNode);\n event.preventDefault();\n return false;\n } else if (this.nodeDraggingScope.draggedNodes.length) {\n return this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n draggedNode.x = Math.round(this.getXCoordinate(dragOffset.x + event.clientX));\n draggedNode.y = Math.round(this.getYCoordinate(dragOffset.y + event.clientY));\n }\n event.preventDefault();\n return false;\n });\n }\n }\n\n public dragover(event: DragEvent) {\n if (nodeDropScope.dropElement) {\n const offsetInfo = nodeDropScope.dropElement.offsetInfo;\n nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px';\n nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px';\n if (this.nodeDraggingScope.shadowDragStarted) {\n this.applyFunction(() => {\n this.destinationHtmlElements[0].style.display = this.oldDisplayStyles[0];\n this.nodeDraggingScope.shadowDragStarted = false;\n });\n }\n event.preventDefault();\n return;\n }\n if (this.modelService.isDropSource()) {\n event.preventDefault();\n return;\n }\n if (!this.nodeDraggingScope.draggedNodes.length) {\n event.preventDefault();\n return;\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n if (this.nodeDraggingScope.draggedNodes.length) {\n return this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n draggedNode.x = this.getXCoordinate(dragOffset.x + event.clientX);\n draggedNode.y = this.getYCoordinate(dragOffset.y + event.clientY);\n this.resizeCanvas(draggedNode, this.draggedElements[i]);\n }\n event.preventDefault();\n return false;\n });\n }\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.nodeDraggingScope.draggedNodes.length) {\n if (this.nodeDraggingScope.shadowDragStarted) {\n this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n this.destinationHtmlElements[i].style.display = this.oldDisplayStyles[i];\n }\n this.nodeDraggingScope.shadowDragStarted = false;\n });\n }\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px');\n this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px');\n this.resizeCanvas(draggedNode, this.draggedElements[i]);\n }\n event.preventDefault();\n }\n }\n }\n\n public dragend(event: DragEvent) {\n this.applyFunction(() => {\n if (nodeDropScope.dropElement) {\n nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement);\n nodeDropScope.dropElement = null;\n }\n if (this.modelService.isDropSource()) {\n return;\n }\n if (this.nodeDraggingScope.shadowElements.length) {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const shadowElement = this.nodeDraggingScope.shadowElements[i];\n draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10);\n draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10);\n this.modelService.canvasHtmlElement.removeChild(shadowElement[0]);\n }\n this.nodeDraggingScope.shadowElements.length = 0;\n }\n\n if (this.nodeDraggingScope.draggedNodes.length) {\n this.nodeDraggingScope.draggedNodes.length = 0;\n this.draggedElements.length = 0;\n this.dragOffsets.length = 0;\n }\n });\n }\n\n}\n\nexport interface NodeDraggingScope {\n draggedNodes: Array;\n shadowElements: Array>;\n shadowDragStarted: boolean;\n dropElement: HTMLElement;\n}\n\nexport interface NodeDropElement extends HTMLElement {\n offsetInfo?: {\n offsetX: number;\n offsetY: number;\n };\n}\n\nexport interface NodeDropScope {\n dropElement: NodeDropElement;\n}\n\nexport interface DropNodeInfo {\n node: FcNode;\n dropTargetId: string;\n offsetX: number;\n offsetY: number;\n}\n","import { Injectable } from '@angular/core';\nimport { FcCoords, FlowchartConstants } from './ngx-flowchart.models';\n\n@Injectable()\nexport class FcEdgeDrawingService {\n\n constructor() {\n }\n\n public getEdgeDAttribute(pt1: FcCoords, pt2: FcCoords, style: string): string {\n let dAddribute = `M ${pt1.x}, ${pt1.y} `;\n if (style === FlowchartConstants.curvedStyle) {\n const sourceTangent = this.computeEdgeSourceTangent(pt1, pt2);\n const destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2);\n dAddribute += `C ${sourceTangent.x}, ${sourceTangent.y} ${(destinationTangent.x - 50)}, ${destinationTangent.y} ${pt2.x}, ${pt2.y}`;\n } else {\n dAddribute += `L ${pt2.x}, ${pt2.y}`;\n }\n return dAddribute;\n }\n\n public getEdgeCenter(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: (pt1.x + pt2.x) / 2,\n y: (pt1.y + pt2.y) / 2\n };\n }\n\n private computeEdgeTangentOffset(pt1: FcCoords, pt2: FcCoords): number {\n return (pt2.y - pt1.y) / 2;\n }\n\n private computeEdgeSourceTangent(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: pt1.x,\n y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2)\n };\n }\n\n private computeEdgeDestinationTangent(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: pt2.x,\n y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2)\n };\n }\n\n}\n","import { FcModelService } from './model.service';\nimport { FcConnector, FcCoords, FcEdge, FcModel, FlowchartConstants, ModelvalidationError } from './ngx-flowchart.models';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { FcModelValidationService } from './modelvalidation.service';\n\nexport class FcEdgeDraggingService {\n\n edgeDragging: EdgeDragging = {\n isDragging: false,\n dragPoint1: null,\n dragPoint2: null,\n shadowDragStarted: false\n };\n\n private draggedEdgeSource: FcConnector = null;\n private dragOffset: FcCoords = {};\n private destinationHtmlElement: HTMLElement = null;\n private oldDisplayStyle = '';\n\n private readonly modelValidation: FcModelValidationService;\n private readonly edgeDrawingService: FcEdgeDrawingService;\n private readonly modelService: FcModelService;\n private readonly model: FcModel;\n private readonly isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n private readonly dragAnimation: string;\n private readonly edgeStyle: string;\n\n constructor(modelValidation: FcModelValidationService,\n edgeDrawingService: FcEdgeDrawingService,\n modelService: FcModelService,\n model: FcModel,\n isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean,\n applyFunction: (fn: (...args: any[]) => T) => T,\n dragAnimation: string,\n edgeStyle: string) {\n this.modelValidation = modelValidation;\n this.edgeDrawingService = edgeDrawingService;\n this.modelService = modelService;\n this.model = model;\n this.isValidEdgeCallback = isValidEdgeCallback || (() => true);\n this.applyFunction = applyFunction;\n this.dragAnimation = dragAnimation;\n this.edgeStyle = edgeStyle;\n }\n\n public dragstart(event: DragEvent, connector: FcConnector) {\n let swapConnector: FcConnector;\n let dragLabel: string;\n let prevEdge: FcEdge;\n if (connector.type === FlowchartConstants.leftConnectorType) {\n for (const edge of this.model.edges) {\n if (edge === connector.id) {\n swapConnector = this.modelService.connectors.getConnector(edge.source);\n dragLabel = edge.label;\n prevEdge = edge;\n this.applyFunction(() => {\n this.modelService.edges.delete(edge);\n });\n break;\n }\n }\n }\n this.edgeDragging.isDragging = true;\n if (swapConnector !== undefined) {\n this.draggedEdgeSource = swapConnector;\n this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id);\n this.edgeDragging.dragLabel = dragLabel;\n this.edgeDragging.prevEdge = prevEdge;\n } else {\n this.draggedEdgeSource = connector;\n this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id);\n }\n const canvas = this.modelService.canvasHtmlElement;\n if (!canvas) {\n throw new Error('No canvas while edgedraggingService found.');\n }\n this.dragOffset.x = -canvas.getBoundingClientRect().left;\n this.dragOffset.y = -canvas.getBoundingClientRect().top;\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n\n originalEvent.dataTransfer.setData('Text', 'Just to support firefox');\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n this.destinationHtmlElement = event.target as HTMLElement;\n this.oldDisplayStyle = this.destinationHtmlElement.style.display;\n this.destinationHtmlElement.style.display = 'none';\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.edgeDragging.shadowDragStarted = true;\n }\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.edgeDragging.gElement === undefined) {\n this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class'));\n this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path');\n this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle');\n }\n\n this.edgeDragging.gElement.css('display', 'block');\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n }\n event.stopPropagation();\n }\n\n public dragover(event: DragEvent) {\n if (this.edgeDragging.isDragging) {\n if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.destinationHtmlElement !== null) {\n this.destinationHtmlElement.style.display = this.oldDisplayStyle;\n }\n\n if (this.edgeDragging.shadowDragStarted) {\n this.applyFunction(() => {\n this.edgeDragging.shadowDragStarted = false;\n });\n }\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n return this.applyFunction(() => {\n if (this.destinationHtmlElement !== null) {\n this.destinationHtmlElement.style.display = this.oldDisplayStyle;\n }\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n });\n }\n }\n }\n\n public dragoverConnector(event: DragEvent, connector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n this.dragover(event);\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: connector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n }\n }\n\n public dragleaveMagnet(event: DragEvent) {\n this.edgeDragging.magnetActive = false;\n }\n\n public dragoverMagnet(event: DragEvent, connector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n this.dragover(event);\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: connector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) {\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n\n this.edgeDragging.magnetActive = true;\n\n this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id);\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n\n event.preventDefault();\n event.stopPropagation();\n return false;\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n return this.applyFunction(() => {\n this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id);\n event.preventDefault();\n event.stopPropagation();\n return false;\n });\n }\n }\n }\n }\n\n public dragend(event: DragEvent) {\n if (this.edgeDragging.isDragging) {\n this.edgeDragging.isDragging = false;\n this.edgeDragging.dragPoint1 = null;\n this.edgeDragging.dragPoint2 = null;\n this.edgeDragging.dragLabel = null;\n event.stopPropagation();\n\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.edgeDragging.gElement.css('display', 'none');\n }\n if (this.edgeDragging.prevEdge) {\n const edge = this.edgeDragging.prevEdge;\n this.edgeDragging.prevEdge = null;\n this.applyFunction(() => {\n this.modelService.edges.putEdge(edge);\n });\n }\n }\n }\n\n public drop(event: DragEvent, targetConnector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: targetConnector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n\n if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) {\n this.edgeDragging.prevEdge = null;\n this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel);\n event.stopPropagation();\n event.preventDefault();\n return false;\n }\n }\n }\n}\n\nexport interface EdgeDragging {\n isDragging: boolean;\n shadowDragStarted: boolean;\n dragPoint1: FcCoords;\n dragPoint2: FcCoords;\n dragLabel?: string;\n prevEdge?: FcEdge;\n magnetActive?: boolean;\n gElement?: JQuery;\n pathElement?: JQuery;\n circleElement?: JQuery;\n}\n","import { FcConnector, FcEdge, FcNode } from './ngx-flowchart.models';\n\nexport class FcMouseOverService {\n\n mouseoverscope: MouseOverScope = {\n connector: null,\n edge: null,\n node: null\n };\n\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(applyFunction: (fn: (...args: any[]) => T) => T) {\n this.applyFunction = applyFunction;\n }\n\n public nodeMouseOver(event: MouseEvent, node: FcNode) {\n return this.applyFunction(() => {\n this.mouseoverscope.node = node;\n });\n }\n\n public nodeMouseOut(event: MouseEvent, node: FcNode) {\n return this.applyFunction(() => {\n this.mouseoverscope.node = null;\n });\n }\n\n public connectorMouseEnter(event: MouseEvent, connector: FcConnector) {\n return this.applyFunction(() => {\n this.mouseoverscope.connector = connector;\n });\n }\n\n public connectorMouseLeave(event: MouseEvent, connector: FcConnector) {\n return this.applyFunction(() => {\n this.mouseoverscope.connector = null;\n });\n }\n\n public edgeMouseEnter(event: MouseEvent, edge: FcEdge) {\n this.mouseoverscope.edge = edge;\n }\n\n public edgeMouseLeave(event: MouseEvent, edge: FcEdge) {\n this.mouseoverscope.edge = null;\n }\n}\n\nexport interface MouseOverScope {\n connector: FcConnector;\n edge: FcEdge;\n node: FcNode;\n}\n","const regex = /(auto|scroll)/;\n\nconst style = (node: Element, prop: string): string =>\n getComputedStyle(node, null).getPropertyValue(prop);\n\nconst scroll = (node: Element) =>\n regex.test(\n style(node, 'overflow') +\n style(node, 'overflow-y') +\n style(node, 'overflow-x'));\n\nconst scrollparent = (node: HTMLElement): HTMLElement =>\n !node || node === document.body\n ? document.body\n : scroll(node)\n ? node\n : scrollparent(node.parentNode as HTMLElement);\n\nexport default scrollparent;\n","import { FcModelService } from './model.service';\nimport { FcRectBox } from 'ngx-flowchart-dev';\nimport scrollparent from './scrollparent';\n\ninterface Rectangle {\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n}\n\nexport class FcRectangleSelectService {\n\n private readonly selectRect: Rectangle = {\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 0\n };\n\n private readonly modelService: FcModelService;\n private readonly selectElement: HTMLElement;\n private readonly $canvasElement: JQuery;\n private readonly $scrollParent: JQuery;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(modelService: FcModelService,\n selectElement: HTMLElement,\n applyFunction: (fn: (...args: any[]) => T) => T) {\n this.modelService = modelService;\n this.selectElement = selectElement;\n this.$canvasElement = $(this.modelService.canvasHtmlElement);\n this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement));\n this.applyFunction = applyFunction;\n }\n\n public mousedown(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && this.selectElement.hidden) {\n this.selectElement.hidden = false;\n const offset = this.$canvasElement.offset();\n this.selectRect.x1 = Math.round(e.pageX - offset.left);\n this.selectRect.y1 = Math.round(e.pageY - offset.top);\n this.selectRect.x2 = this.selectRect.x1;\n this.selectRect.y2 = this.selectRect.y1;\n this.updateSelectRect();\n }\n }\n\n public mousemove(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && !this.selectElement.hidden) {\n const offset = this.$canvasElement.offset();\n this.selectRect.x2 = Math.round(e.pageX - offset.left);\n this.selectRect.y2 = Math.round(e.pageY - offset.top);\n this.updateScroll(offset);\n this.updateSelectRect();\n }\n }\n\n private updateScroll(offset: JQuery.Coordinates) {\n const rect = this.$scrollParent[0].getBoundingClientRect();\n const bottom = rect.bottom - offset.top;\n const right = rect.right - offset.left;\n const top = rect.top - offset.top;\n const left = rect.left - offset.left;\n if (this.selectRect.y2 - top < 25) {\n const topScroll = 25 - (this.selectRect.y2 - top);\n const scroll = this.$scrollParent.scrollTop();\n this.$scrollParent.scrollTop(scroll - topScroll);\n } else if (bottom - this.selectRect.y2 < 40) {\n const bottomScroll = 40 - (bottom - this.selectRect.y2);\n const scroll = this.$scrollParent.scrollTop();\n this.$scrollParent.scrollTop(scroll + bottomScroll);\n }\n if (this.selectRect.x2 - left < 25) {\n const leftScroll = 25 - (this.selectRect.x2 - left);\n const scroll = this.$scrollParent.scrollLeft();\n this.$scrollParent.scrollLeft(scroll - leftScroll);\n } else if (right - this.selectRect.x2 < 40) {\n const rightScroll = 40 - (right - this.selectRect.x2);\n const scroll = this.$scrollParent.scrollLeft();\n this.$scrollParent.scrollLeft(scroll + rightScroll);\n }\n }\n\n public mouseup(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && !this.selectElement.hidden) {\n const rectBox = this.selectElement.getBoundingClientRect() as FcRectBox;\n this.selectElement.hidden = true;\n this.selectObjects(rectBox);\n }\n }\n\n private updateSelectRect() {\n const x3 = Math.min(this.selectRect.x1, this.selectRect.x2);\n const x4 = Math.max(this.selectRect.x1, this.selectRect.x2);\n const y3 = Math.min(this.selectRect.y1, this.selectRect.y2);\n const y4 = Math.max(this.selectRect.y1, this.selectRect.y2);\n this.selectElement.style.left = x3 + 'px';\n this.selectElement.style.top = y3 + 'px';\n this.selectElement.style.width = x4 - x3 + 'px';\n this.selectElement.style.height = y4 - y3 + 'px';\n }\n\n private selectObjects(rectBox: FcRectBox) {\n this.applyFunction(() => {\n this.modelService.selectAllInRect(rectBox);\n });\n }\n\n}\n\n","import {\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnInit\n} from '@angular/core';\nimport { FcCallbacks, FcEdge, FcModel, FcNode, FlowchartConstants, UserCallbacks, UserNodeCallbacks } from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\nimport { FcModelValidationService } from './modelvalidation.service';\nimport { FcNodeDraggingService } from './node-dragging.service';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { FcEdgeDraggingService } from './edge-dragging.service';\nimport { FcMouseOverService } from './mouseover.service';\nimport { FcRectangleSelectService } from './rectangleselect.service';\n\n@Component({\n selector: 'fc-canvas',\n templateUrl: './ngx-flowchart.component.html',\n styleUrls: ['./ngx-flowchart.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgxFlowchartComponent implements OnInit, DoCheck {\n\n @HostBinding('attr.class')\n get canvasClass(): string {\n return FlowchartConstants.canvasClass;\n }\n\n @Input()\n model: FcModel;\n\n @Input()\n selectedObjects: any[];\n\n @Input()\n edgeStyle: string;\n\n @Input()\n userCallbacks: UserCallbacks;\n\n @Input()\n automaticResize: boolean;\n\n @Input()\n dragAnimation: string;\n\n @Input()\n nodeWidth: number;\n\n @Input()\n nodeHeight: number;\n\n @Input()\n dropTargetId: string;\n\n callbacks: FcCallbacks;\n\n userNodeCallbacks: UserNodeCallbacks;\n\n modelService: FcModelService;\n nodeDraggingService: FcNodeDraggingService;\n edgeDraggingService: FcEdgeDraggingService;\n mouseoverService: FcMouseOverService;\n rectangleSelectService: FcRectangleSelectService;\n\n arrowDefId: string;\n arrowDefIdSelected: string;\n\n flowchartConstants = FlowchartConstants;\n\n private nodesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => {\n return item;\n });\n\n private edgesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => {\n return item;\n });\n\n constructor(private elementRef: ElementRef,\n private differs: IterableDiffers,\n private modelValidation: FcModelValidationService,\n public edgeDrawingService: FcEdgeDrawingService,\n private cd: ChangeDetectorRef,\n private zone: NgZone) {\n this.arrowDefId = 'arrow-' + Math.random();\n this.arrowDefIdSelected = this.arrowDefId + '-selected';\n }\n\n ngOnInit() {\n if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) {\n throw new Error('edgeStyle not supported.');\n }\n this.nodeHeight = this.nodeHeight || 200;\n this.nodeWidth = this.nodeWidth || 200;\n this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint;\n this.userCallbacks = this.userCallbacks || {};\n this.automaticResize = this.automaticResize || false;\n\n for (const key of Object.keys(this.userCallbacks)) {\n const callback = this.userCallbacks[key];\n if (typeof callback !== 'function' && key !== 'nodeCallbacks') {\n throw new Error('All callbacks should be functions.');\n }\n }\n\n this.userNodeCallbacks = this.userCallbacks.nodeCallbacks;\n\n const element = $(this.elementRef.nativeElement);\n\n this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects,\n this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved,\n this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg'));\n\n if (this.dropTargetId) {\n this.modelService.dropTargetId = this.dropTargetId;\n }\n\n const applyFunction = this.zone.run.bind(this.zone);\n\n this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction,\n this.automaticResize, this.dragAnimation);\n\n this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService,\n this.model, this.userCallbacks.isValidEdge || null, applyFunction,\n this.dragAnimation, this.edgeStyle);\n\n this.mouseoverService = new FcMouseOverService(applyFunction);\n\n this.rectangleSelectService = new FcRectangleSelectService(this.modelService,\n element[0].querySelector('#select-rectangle'), applyFunction);\n\n this.callbacks = {\n nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService),\n nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService),\n edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService),\n edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService),\n edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService),\n edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService),\n edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService),\n edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService),\n nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService),\n nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService),\n connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService),\n connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService),\n nodeClicked: (event, node) => {\n this.modelService.nodes.handleClicked(node, event.ctrlKey);\n event.stopPropagation();\n event.preventDefault();\n }\n };\n this.adjustCanvasSize(true);\n }\n\n ngDoCheck(): void {\n if (this.model) {\n const nodesChange = this.nodesDiffer.diff(this.model.nodes);\n const edgesChange = this.edgesDiffer.diff(this.model.edges);\n let nodesChanged = false;\n let edgesChanged = false;\n if (nodesChange !== null) {\n nodesChange.forEachAddedItem(() => {\n nodesChanged = true;\n });\n nodesChange.forEachRemovedItem(() => {\n nodesChanged = true;\n });\n }\n if (edgesChange !== null) {\n edgesChange.forEachAddedItem(() => {\n edgesChanged = true;\n });\n edgesChange.forEachRemovedItem(() => {\n edgesChanged = true;\n });\n }\n if (nodesChanged) {\n this.adjustCanvasSize(true);\n }\n if (nodesChanged || edgesChanged) {\n this.cd.detectChanges();\n }\n }\n }\n\n getEdgeDAttribute(edge: FcEdge): string {\n return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge),\n this.modelService.edges.destCoord(edge), this.edgeStyle);\n }\n\n public adjustCanvasSize(fit?: boolean) {\n let maxX = 0;\n let maxY = 0;\n const element = $(this.elementRef.nativeElement);\n this.model.nodes.forEach((node) => {\n maxX = Math.max(node.x + this.nodeWidth, maxX);\n maxY = Math.max(node.y + this.nodeHeight, maxY);\n });\n let width;\n let height;\n if (fit) {\n width = maxX;\n height = maxY;\n } else {\n width = Math.max(maxX, element.prop('offsetWidth'));\n height = Math.max(maxY, element.prop('offsetHeight'));\n }\n element.css('width', width + 'px');\n element.css('height', height + 'px');\n }\n\n canvasClick(event: MouseEvent) {}\n\n edgeMouseDown(event: MouseEvent, edge: FcEdge) {\n event.stopPropagation();\n }\n\n edgeClick(event: MouseEvent, edge: FcEdge) {\n this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey);\n event.stopPropagation();\n event.preventDefault();\n }\n\n edgeRemove(event: Event, edge: FcEdge) {\n this.modelService.edges.delete(edge);\n event.stopPropagation();\n event.preventDefault();\n }\n\n edgeEdit(event: Event, edge: FcEdge) {\n if (this.userCallbacks.edgeEdit) {\n this.userCallbacks.edgeEdit(event, edge);\n }\n }\n\n edgeDoubleClick(event: MouseEvent, edge: FcEdge) {\n if (this.userCallbacks.edgeDoubleClick) {\n this.userCallbacks.edgeDoubleClick(event, edge);\n }\n }\n\n edgeMouseOver(event: MouseEvent, edge: FcEdge) {\n if (this.userCallbacks.edgeMouseOver) {\n this.userCallbacks.edgeMouseOver(event, edge);\n }\n }\n\n edgeMouseEnter(event: MouseEvent, edge: FcEdge) {\n this.mouseoverService.edgeMouseEnter(event, edge);\n }\n\n edgeMouseLeave(event: MouseEvent, edge: FcEdge) {\n this.mouseoverService.edgeMouseLeave(event, edge);\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n this.nodeDraggingService.dragover(event);\n this.edgeDraggingService.dragover(event);\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n if (event.preventDefault) {\n event.preventDefault();\n }\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n this.nodeDraggingService.drop(event);\n }\n\n @HostListener('mousedown', ['$event'])\n mousedown(event: MouseEvent) {\n this.rectangleSelectService.mousedown(event);\n }\n\n @HostListener('mousemove', ['$event'])\n mousemove(event: MouseEvent) {\n this.rectangleSelectService.mousemove(event);\n }\n\n @HostListener('mouseup', ['$event'])\n mouseup(event: MouseEvent) {\n this.rectangleSelectService.mouseup(event);\n }\n\n}\n","import { Directive, ElementRef, HostListener, Input, OnInit } from '@angular/core';\nimport { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[fc-magnet]'\n})\nexport class FcMagnetDirective implements OnInit {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n connector: FcConnector;\n\n constructor(public elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.magnetClass);\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n return this.callbacks.edgeDragoverMagnet(event, this.connector);\n }\n\n @HostListener('dragleave', ['$event'])\n dragleave(event: DragEvent) {\n this.callbacks.edgeDragleaveMagnet(event);\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n return this.callbacks.edgeDrop(event, this.connector);\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n this.callbacks.edgeDragend(event);\n }\n\n}\n","import { Directive, ElementRef, HostListener, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[fc-connector]'\n})\nexport class FcConnectorDirective implements OnInit, OnChanges {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n connector: FcConnector;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n constructor(public elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.connectorClass);\n if (this.modelservice.isEditable()) {\n element.attr('draggable', 'true');\n this.updateConnectorClass();\n }\n this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n let updateConnector = false;\n for (const propName of Object.keys(changes)) {\n const change = changes[propName];\n if (!change.firstChange && change.currentValue !== change.previousValue) {\n if (propName === 'mouseOverConnector') {\n updateConnector = true;\n }\n }\n }\n if (updateConnector && this.modelservice.isEditable()) {\n this.updateConnectorClass();\n }\n }\n\n private updateConnectorClass() {\n const element = $(this.elementRef.nativeElement);\n if (this.connector === this.mouseOverConnector) {\n element.addClass(FlowchartConstants.hoverClass);\n } else {\n element.removeClass(FlowchartConstants.hoverClass);\n }\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n // Skip - conflict with magnet\n /* if (this.modelservice.isEditable()) {\n return this.callbacks.edgeDragoverConnector(event, this.connector);\n }*/\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n return this.callbacks.edgeDrop(event, this.connector);\n }\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.edgeDragend(event);\n }\n }\n\n @HostListener('dragstart', ['$event'])\n dragstart(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.edgeDragstart(event, this.connector);\n }\n }\n\n @HostListener('mouseenter', ['$event'])\n mouseenter(event: MouseEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.connectorMouseEnter(event, this.connector);\n }\n }\n\n @HostListener('mouseleave', ['$event'])\n mouseleave(event: MouseEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.connectorMouseLeave(event, this.connector);\n }\n }\n\n}\n","import {\n Component,\n ComponentFactoryResolver, Directive,\n ElementRef, HostBinding,\n HostListener,\n Inject,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport {\n FC_NODE_COMPONENT_CONFIG,\n FcCallbacks,\n FcConnector,\n FcNode,\n FcNodeComponentConfig,\n FlowchartConstants,\n UserNodeCallbacks\n} from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\n\n@Component({\n selector: 'fc-node',\n template: '',\n styleUrls: ['./node.component.scss']\n})\nexport class FcNodeContainerComponent implements OnInit, OnChanges {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n userNodeCallbacks: UserNodeCallbacks;\n\n @Input()\n node: FcNode;\n\n @Input()\n selected: boolean;\n\n @Input()\n edit: boolean;\n\n @Input()\n underMouse: boolean;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n dragging: boolean;\n\n @HostBinding('attr.id')\n get nodeId(): string {\n return this.node.id;\n }\n\n @HostBinding('style.top')\n get top(): string {\n return this.node.y + 'px';\n }\n\n @HostBinding('style.left')\n get left(): string {\n return this.node.x + 'px';\n }\n\n nodeComponent: FcNodeComponent;\n\n @ViewChild('nodeContent', {read: ViewContainerRef, static: true}) nodeContentContainer: ViewContainerRef;\n\n constructor(@Inject(FC_NODE_COMPONENT_CONFIG) private nodeComponentConfig: FcNodeComponentConfig,\n private elementRef: ElementRef,\n private componentFactoryResolver: ComponentFactoryResolver) {\n }\n\n ngOnInit(): void {\n if (!this.userNodeCallbacks) {\n this.userNodeCallbacks = {};\n }\n this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || (() => {});\n this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || (() => {});\n this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || (() => {});\n this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || (() => {});\n this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || (() => {});\n\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.nodeClass);\n if (!this.node.readonly) {\n element.attr('draggable', 'true');\n }\n this.updateNodeClass();\n this.modelservice.nodes.setHtmlElement(this.node.id, element[0]);\n this.nodeContentContainer.clear();\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType);\n const componentRef = this.nodeContentContainer.createComponent(componentFactory);\n this.nodeComponent = componentRef.instance;\n this.nodeComponent.callbacks = this.callbacks;\n this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks;\n this.nodeComponent.node = this.node;\n this.nodeComponent.modelservice = this.modelservice;\n this.updateNodeComponent();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n let updateNode = false;\n for (const propName of Object.keys(changes)) {\n const change = changes[propName];\n if (!change.firstChange && change.currentValue !== change.previousValue) {\n if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) {\n updateNode = true;\n }\n }\n }\n if (updateNode) {\n this.updateNodeClass();\n this.updateNodeComponent();\n }\n }\n\n private updateNodeClass() {\n const element = $(this.elementRef.nativeElement);\n this.toggleClass(element, FlowchartConstants.selectedClass, this.selected);\n this.toggleClass(element, FlowchartConstants.editClass, this.edit);\n this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse);\n this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging);\n }\n\n private updateNodeComponent() {\n this.nodeComponent.selected = this.selected;\n this.nodeComponent.edit = this.edit;\n this.nodeComponent.underMouse = this.underMouse;\n this.nodeComponent.mouseOverConnector = this.mouseOverConnector;\n this.nodeComponent.dragging = this.dragging;\n }\n\n private toggleClass(element: JQuery, clazz: string, set: boolean) {\n if (set) {\n element.addClass(clazz);\n } else {\n element.removeClass(clazz);\n }\n }\n\n @HostListener('mousedown', ['$event'])\n mousedown(event: MouseEvent) {\n event.stopPropagation();\n }\n\n @HostListener('dragstart', ['$event'])\n dragstart(event: DragEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeDragstart(event, this.node);\n }\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeDragend(event);\n }\n }\n\n @HostListener('click', ['$event'])\n click(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeClicked(event, this.node);\n }\n }\n\n @HostListener('mouseover', ['$event'])\n mouseover(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeMouseOver(event, this.node);\n }\n }\n\n @HostListener('mouseout', ['$event'])\n mouseout(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeMouseOut(event, this.node);\n }\n }\n\n}\n\nexport abstract class FcNodeComponent implements OnInit {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n userNodeCallbacks: UserNodeCallbacks;\n\n @Input()\n node: FcNode;\n\n @Input()\n selected: boolean;\n\n @Input()\n edit: boolean;\n\n @Input()\n underMouse: boolean;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n dragging: boolean;\n\n flowchartConstants = FlowchartConstants;\n\n ngOnInit(): void {\n }\n\n}\n","import { Component } from '@angular/core';\nimport { FcNodeComponent } from './node.component';\n\n@Component({\n selector: 'fc-default-node',\n templateUrl: './default-node.component.html',\n styleUrls: ['./default-node.component.scss']\n})\nexport class DefaultFcNodeComponent extends FcNodeComponent {\n\n constructor() {\n super();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { NgxFlowchartComponent } from './ngx-flowchart.component';\nimport { FcModelValidationService } from './modelvalidation.service';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { CommonModule } from '@angular/common';\nimport { FcMagnetDirective } from './magnet.directive';\nimport { FcConnectorDirective } from './connector.directive';\nimport { FcNodeContainerComponent } from './node.component';\nimport { FC_NODE_COMPONENT_CONFIG } from './ngx-flowchart.models';\nimport { DefaultFcNodeComponent } from './default-node.component';\n\n@NgModule({\n entryComponents: [\n DefaultFcNodeComponent\n ],\n declarations: [NgxFlowchartComponent,\n FcMagnetDirective,\n FcConnectorDirective,\n FcNodeContainerComponent,\n DefaultFcNodeComponent],\n providers: [\n FcModelValidationService,\n FcEdgeDrawingService,\n {\n provide: FC_NODE_COMPONENT_CONFIG,\n useValue: {\n nodeComponentType: DefaultFcNodeComponent\n }\n }\n ],\n imports: [\n CommonModule\n ],\n exports: [NgxFlowchartComponent,\n FcMagnetDirective,\n FcConnectorDirective,\n DefaultFcNodeComponent]\n})\nexport class NgxFlowchartModule { }\n"],"names":["InjectionToken","tslib_1.__extends","tslib_1.__values","of","Injectable","Component","ChangeDetectionStrategy","ElementRef","IterableDiffers","ChangeDetectorRef","NgZone","HostBinding","Input","HostListener","Directive","Inject","ComponentFactoryResolver","ViewChild","ViewContainerRef","NgModule","CommonModule"],"mappings":";;;;;;IAAA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACnF,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;;AAEF,IAAO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K;wCAGLA,UAAK;2BAGLA,UAAK;+BAGLA,UAAK;2BAGLA,UAAK;iCAGLA,UAAK;yCAGLA,UAAK;mCAGLA,UAAK;+BAGLA,UAAK;;QAQR,sBAAC;KAlCD,IAkCC;;;QAhCC,oCACuB;;QAEvB,4CACqC;;QAErC,+BACa;;QAEb,mCACkB;;QAElB,+BACc;;QAEd,qCACoB;;QAEpB,6CACgC;;QAEhC,uCAC6B;;QAE7B,mCACkB;;QAElB,6CAAwC;;;;;;;;QCrNEX,0CAAe;QAEzD;mBACE,iBAAO;SACR;;oBATFI,cAAS,SAAC;wBACT,QAAQ,EAAE,iBAAiB;wBAC3B,8hDAA4C;;qBAE7C;;;;QAOD,6BAAC;KAAA,CAN2C,eAAe;;;;;;ICR3D,WAyBgB;QACR,iBAAiB,EAAE,sBAAsB;KAC1C;AAhBP;QAAA;SA2BmC;;oBA3BlCc,aAAQ,SAAC;wBACR,eAAe,EAAE;4BACf,sBAAsB;yBACvB;wBACD,YAAY,EAAE,CAAC,qBAAqB;4BAClC,iBAAiB;4BACjB,oBAAoB;4BACpB,wBAAwB;4BACxB,sBAAsB,CAAC;wBACzB,SAAS,EAAE;4BACT,wBAAwB;4BACxB,oBAAoB;4BACpB;gCACE,OAAO,EAAE,wBAAwB;gCACjC,QAAQ,MAEP;6BACF;yBACF;wBACD,OAAO,EAAE;4BACPC,mBAAY;yBACb;wBACD,OAAO,EAAE,CAAC,qBAAqB;4BAC7B,iBAAiB;4BACjB,oBAAoB;4BACpB,sBAAsB,CAAC;qBAC1B;;QACiC,yBAAC;KA3BnC;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/ngx-flowchart/bundles/ngx-flowchart.umd.min.js b/dist/ngx-flowchart/bundles/ngx-flowchart.umd.min.js index f4b1561..4724da1 100644 --- a/dist/ngx-flowchart/bundles/ngx-flowchart.umd.min.js +++ b/dist/ngx-flowchart/bundles/ngx-flowchart.umd.min.js @@ -1,2 +1,16 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-flowchart",["exports","@angular/core"],n):n((e=e||self)["ngx-flowchart"]={},e.ng.core)}(this,(function(e,n){"use strict";var t=function(){function e(){}return e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}(),o=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"fc-canvas",template:"\n

\n ngx-flowchart works!\n

\n "}]}],e.ctorParameters=function(){return[]},e}(),r=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{declarations:[o],imports:[],exports:[o]}]}],e}();e.NgxFlowchartComponent=o,e.NgxFlowchartModule=r,e.NgxFlowchartService=t,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-flowchart",["exports","@angular/core","rxjs","@angular/common"],t):t((e=e||self)["ngx-flowchart"]={},e.ng.core,e.rxjs,e.ng.common)}(this,(function(e,t,n,o){"use strict"; +/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function s(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}var a=new t.InjectionToken("fc-node.component.config");var d={htmlPrefix:"fc",leftConnectorType:"leftConnector",rightConnectorType:"rightConnector",curvedStyle:"curved",lineStyle:"line",dragAnimationRepaint:"repaint",dragAnimationShadow:"shadow",canvasClass:"fc-canvas",selectedClass:"fc-selected",editClass:"fc-edit",activeClass:"fc-active",hoverClass:"fc-hover",draggingClass:"fc-dragging",edgeClass:"fc-edge",edgeLabelClass:"fc-edge-label",connectorClass:"fc-connector",magnetClass:"fc-magnet",nodeClass:"fc-node",nodeOverlayClass:"fc-node-overlay",leftConnectorClass:"fc-leftConnectors",rightConnectorClass:"fc-rightConnectors",canvasResizeThreshold:200,canvasResizeStep:200};var l=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t}(Error);function c(e){var t,n,o,r,i={};e.nodes.forEach((function(e){i[e.id]={incoming:0,outgoing:[]}})),e.edges.forEach((function(t){var n=e.nodes.filter((function(e){return e.connectors.some((function(e){return e.id===t.source}))}))[0],o=e.nodes.filter((function(e){return e.connectors.some((function(e){return e.id===t.destination}))}))[0];i[n.id].outgoing.push(o.id),i[o.id].incoming++}));var a=[],d=[];try{for(var l=s(Object.keys(i)),c=l.next();!c.done;c=l.next()){var g=c.value;0===i[g].incoming&&d.push(g)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}for(;0!==d.length;){for(var h=d.pop(),p=0;p=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},e.prototype.getItemInfoAtPoint=function(e,t){return{node:this.getNodeAtPoint(e,t),edge:this.getEdgeAtPoint(e,t)}},e.prototype.getNodeAtPoint=function(e,t){var n,o;try{for(var r=s(this.model.nodes),i=r.next();!i.done;i=r.next()){var a=i.value,d=this.nodes.getHtmlElement(a.id).getBoundingClientRect();if(e>=d.left&&e<=d.right&&t>=d.top&&t<=d.bottom)return a}}catch(e){n={error:e}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return null},e.prototype.getEdgeAtPoint=function(e,t){var n=document.elementFromPoint(e,t).id,o=-1;return n&&(n.startsWith("fc-edge-path-")?o=Number(n.substring("fc-edge-path-".length)):n.startsWith("fc-edge-label-")&&(o=Number(n.substring("fc-edge-label-".length)))),o>-1?this.model.edges[o]:null},e.prototype.selectAllInRect=function(e){var t=this;this.model.nodes.forEach((function(n){var o=t.nodes.getHtmlElement(n.id).getBoundingClientRect();if(!n.readonly){var r=o.left+o.width/2,i=o.top+o.height/2;t.inRectBox(r,i,e)?t.nodes.select(n):t.nodes.isSelected(n)&&t.nodes.deselect(n)}}));var n=this.canvasHtmlElement.getBoundingClientRect();this.model.edges.forEach((function(o){var r=t.edges.sourceCoord(o),i=t.edges.destCoord(o),s=(r.x+i.x)/2+n.left,a=(r.y+i.y)/2+n.top;t.inRectBox(s,a,e)?t.edges.select(o):t.edges.isSelected(o)&&t.edges.deselect(o)}))},e.prototype.deleteSelected=function(){var e=this;this.edges.getSelectedEdges().forEach((function(t){e.edges.delete(t)})),this.nodes.getSelectedNodes().forEach((function(t){e.nodes.delete(t)}))},e.prototype.isEditable=function(){return void 0===this.dropTargetId},e.prototype.isDropSource=function(){return void 0!==this.dropTargetId},e.prototype.getDragImage=function(){return this.dragImage||(this.dragImage=new Image,this.dragImage.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",this.dragImage.style.visibility="hidden"),this.dragImage},e.prototype.registerCallbacks=function(e,t,n){this.edgeAddedCallback=e,this.nodeRemovedCallback=t,this.edgeRemovedCallback=n},e}();var h=function(){function e(e){this.modelService=e}return e.prototype.select=function(e){this.modelService.selectObject(e)},e.prototype.deselect=function(e){this.modelService.deselectObject(e)},e.prototype.toggleSelected=function(e){this.modelService.toggleSelectedObject(e)},e.prototype.isSelected=function(e){return this.modelService.isSelectedObject(e)},e.prototype.isEdit=function(e){return this.modelService.isEditObject(e)},e}();var p=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.getConnector=function(e){var t,n,o,r,i=this.modelService.model;try{for(var a=s(i.nodes),d=a.next();!d.done;d=a.next()){var l=d.value;try{for(var c=(o=void 0,s(l.connectors)),g=c.next();!g.done;g=c.next()){var h=g.value;if(h.id===e)return h}}catch(e){o={error:e}}finally{try{g&&!g.done&&(r=c.return)&&r.call(c)}finally{if(o)throw o.error}}}}catch(e){t={error:e}}finally{try{d&&!d.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},t.prototype.getHtmlElement=function(e){return this.modelService.connectorsHtmlElements[e]},t.prototype.setHtmlElement=function(e,t){this.modelService.connectorsHtmlElements[e]=t,this.modelService.detectChanges()},t.prototype._getCoords=function(e,t){var n=this.getHtmlElement(e),o=this.modelService.canvasHtmlElement;if(null==n||null===o)return{x:0,y:0};var r=n.getBoundingClientRect(),i=o.getBoundingClientRect(),s={x:r.left-i.left,y:r.top-i.top};return t&&(s={x:Math.round(s.x+n.offsetWidth/2),y:Math.round(s.y+n.offsetHeight/2)}),s},t.prototype.getCoords=function(e){return this._getCoords(e,!1)},t.prototype.getCenteredCoord=function(e){return this._getCoords(e,!0)},t}(h),u=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.getConnectorsByType=function(e,t){return e.connectors.filter((function(e){return e.type===t}))},t.prototype._addConnector=function(e,t){e.connectors.push(t);try{this.modelService.modelValidation.validateNode(e)}catch(n){throw e.connectors.splice(e.connectors.indexOf(t),1),n}},t.prototype.delete=function(e){this.isSelected(e)&&this.deselect(e);var t=this.modelService.model,n=t.nodes.indexOf(e);if(-1===n){if(void 0===e)throw new Error("Passed undefined");throw new Error("Tried to delete not existing node")}for(var o=this.getConnectorIds(e),r=0;r-1)return a}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return null},t.prototype.getHtmlElement=function(e){return this.modelService.nodesHtmlElements[e]},t.prototype.setHtmlElement=function(e,t){this.modelService.nodesHtmlElements[e]=t,this.modelService.detectChanges()},t}(h),f=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.ready=function(e){var t=this.modelService.connectors.getHtmlElement(e.source),n=this.modelService.connectors.getHtmlElement(e.destination);return void 0!==t&&void 0!==n},t.prototype.sourceCoord=function(e){return this.modelService.connectors.getCenteredCoord(e.source)},t.prototype.destCoord=function(e){return this.modelService.connectors.getCenteredCoord(e.destination)},t.prototype.delete=function(e){var t=this.modelService.model,n=t.edges.indexOf(e);if(-1===n)throw new Error("Tried to delete not existing edge");this.isSelected(e)&&this.deselect(e),t.edges.splice(n,1),this.modelService.edgeRemovedCallback(e)},t.prototype.getSelectedEdges=function(){var e=this;return this.modelService.model.edges.filter((function(t){return e.modelService.edges.isSelected(t)}))},t.prototype.handleEdgeMouseClick=function(e,t){t?this.modelService.edges.toggleSelected(e):(this.modelService.deselectAll(),this.modelService.edges.select(e))},t.prototype.putEdge=function(e){this.modelService.model.edges.push(e)},t.prototype._addEdge=function(e,t,n,o){var r=this;this.modelService.modelValidation.validateConnector(t),this.modelService.modelValidation.validateConnector(n);var i={};i.source=t.id,i.destination=n.id,i.label=o;var s=this.modelService.model;this.modelService.modelValidation.validateEdges(s.edges.concat([i]),s.nodes),this.modelService.createEdge(e,i).subscribe((function(e){s.edges.push(e),r.modelService.edgeAddedCallback(e)}))},t}(h),v=function(){function e(){}return e.prototype.validateModel=function(e){return this.validateNodes(e.nodes),this._validateEdges(e.edges,e.nodes),e},e.prototype.validateNodes=function(e){var t=this,n=[];e.forEach((function(e){if(t.validateNode(e),-1!==n.indexOf(e.id))throw new l("Id not unique.");n.push(e.id)}));var o=[];return e.forEach((function(e){e.connectors.forEach((function(e){if(-1!==o.indexOf(e.id))throw new l("Id not unique.");o.push(e.id)}))})),e},e.prototype.validateNode=function(e){var t=this;if(void 0===e.id)throw new l("Id not valid.");if("string"!=typeof e.name)throw new l("Name not valid.");if("number"!=typeof e.x||e.x<0||Math.round(e.x)!==e.x)throw new l("Coordinates not valid.");if("number"!=typeof e.y||e.y<0||Math.round(e.y)!==e.y)throw new l("Coordinates not valid.");if(!Array.isArray(e.connectors))throw new l("Connectors not valid.");return e.connectors.forEach((function(e){t.validateConnector(e)})),e},e.prototype._validateEdges=function(e,t){var n=this;if(e.forEach((function(e){n._validateEdge(e,t)})),e.forEach((function(t,n){e.forEach((function(e,o){if(n!==o&&(t.source===e.source&&t.destination===e.destination||t.source===e.destination&&t.destination===e.source))throw new l("Duplicated edge.")}))})),null===c({nodes:t,edges:e}))throw new l("Graph has a circle.");return e},e.prototype.validateEdges=function(e,t){return this.validateNodes(t),this._validateEdges(e,t)},e.prototype._validateEdge=function(e,t){if(void 0===e.source)throw new l("Source not valid.");if(void 0===e.destination)throw new l("Destination not valid.");if(e.source===e.destination)throw new l("Edge with same source and destination connectors.");var n=t.filter((function(t){return t.connectors.some((function(t){return t.id===e.source}))}))[0];if(void 0===n)throw new l("Source not valid.");var o=t.filter((function(t){return t.connectors.some((function(t){return t.id===e.destination}))}))[0];if(void 0===o)throw new l("Destination not valid.");if(n===o)throw new l("Edge with same source and destination nodes.");return e},e.prototype.validateEdge=function(e,t){return this.validateNodes(t),this._validateEdge(e,t)},e.prototype.validateConnector=function(e){if(void 0===e.id)throw new l("Id not valid.");if(void 0===e.type||null===e.type||"string"!=typeof e.type)throw new l("Type not valid.");return e},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),m={dropElement:null},y=function(){function e(e,t,n,o){this.nodeDraggingScope={shadowDragStarted:!1,dropElement:null,draggedNodes:[],shadowElements:[]},this.dragOffsets=[],this.draggedElements=[],this.destinationHtmlElements=[],this.oldDisplayStyles=[],this.modelService=e,this.automaticResize=n,this.dragAnimation=o,this.applyFunction=t}return e.prototype.getCoordinate=function(e,t){return e=Math.max(e,0),e=Math.min(e,t)},e.prototype.getXCoordinate=function(e){return this.getCoordinate(e,this.modelService.canvasHtmlElement.offsetWidth)},e.prototype.getYCoordinate=function(e){return this.getCoordinate(e,this.modelService.canvasHtmlElement.offsetHeight)},e.prototype.resizeCanvas=function(e,t){if(this.automaticResize&&!this.modelService.isDropSource()){var n=this.modelService.canvasHtmlElement;n.offsetWidth

'+k.name+"

"),I=$(this.draggedElements[w]).children()[0];O.children()[0].style.backgroundColor=I.style.backgroundColor,this.nodeDraggingScope.shadowElements.push(O),this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[w][0])}if(S.dataTransfer.setData("text","Just to support firefox"),S.dataTransfer.setDragImage)S.dataTransfer.setDragImage(this.modelService.getDragImage(),0,0);else{for(w=0;w\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {{edgeDraggingService.edgeDragging.dragLabel}}\n
\n
\n \n
\n
\n \n
\n
\n ×\n
\n {{edge.label}}\n
\n \n \n\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;width:100%;height:100%;background-size:25px 25px;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.1) 1px,transparent 1px);background-color:transparent;min-width:100%;min-height:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-canvas-container{display:block;position:relative;width:100%;height:100%}:host .fc-canvas-container svg.fc-canvas-svg{display:block;position:relative;width:100%;height:100%}:host .fc-edge{stroke:gray;stroke-width:4;transition:stroke-width .2s;fill:transparent}:host .fc-edge.fc-hover{stroke:gray;stroke-width:6;fill:transparent}:host .fc-edge.fc-selected{stroke:red;stroke-width:4;fill:transparent}:host .fc-edge.fc-active{-webkit-animation:3s linear infinite dash;animation:3s linear infinite dash;stroke-dasharray:20}:host .fc-edge.fc-dragging{pointer-events:none}:host .fc-arrow-marker polygon{stroke:gray;fill:gray}:host .fc-arrow-marker-selected polygon{stroke:red;fill:red}:host .edge-endpoint{fill:gray}:host .fc-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-edge-label{position:absolute;opacity:.8;transition:transform .2s;transform-origin:bottom left;margin:0 auto}:host .fc-edge-label .fc-edge-label-text{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;text-align:center;font-size:16px}:host .fc-edge-label .fc-edge-label-text span{cursor:default;border:solid #ff3d00;border-radius:10px;color:#ff3d00;background-color:#fff;padding:3px 5px}:host .fc-edge-label .fc-nodeedit{top:-30px;right:14px}:host .fc-edge-label .fc-nodedelete{top:-30px;right:-13px}:host .fc-edge-label.fc-hover{transform:scale(1.25)}:host .fc-edge-label.fc-edit .fc-edge-label-text span,:host .fc-edge-label.fc-selected .fc-edge-label-text span{border:solid red;color:#fff;font-weight:600;background-color:red}:host .fc-select-rectangle{border:2px dashed #5262ff;position:absolute;background:rgba(20,125,255,.1);z-index:2}@-webkit-keyframes dash{from{stroke-dashoffset:500}}@keyframes dash{from{stroke-dashoffset:500}}:host ::ng-deep .fc-nodeedit{display:none;font-size:15px}:host ::ng-deep .fc-nodedelete{display:none;font-size:18px}:host ::ng-deep .fc-edit .fc-nodedelete,:host ::ng-deep .fc-edit .fc-nodeedit{display:block;position:absolute;border:2px solid #eee;border-radius:50%;font-weight:600;line-height:20px;height:20px;padding-top:2px;width:22px;background:#494949;color:#fff;text-align:center;vertical-align:bottom;cursor:pointer}:host ::ng-deep .fc-edit .fc-nodeedit{top:-24px;right:16px}:host ::ng-deep .fc-edit .fc-nodedelete{top:-24px;right:-13px}"]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.IterableDiffers},{type:v},{type:C},{type:t.ChangeDetectorRef},{type:t.NgZone}]},e.propDecorators={canvasClass:[{type:t.HostBinding,args:["attr.class"]}],model:[{type:t.Input}],selectedObjects:[{type:t.Input}],edgeStyle:[{type:t.Input}],userCallbacks:[{type:t.Input}],automaticResize:[{type:t.Input}],dragAnimation:[{type:t.Input}],nodeWidth:[{type:t.Input}],nodeHeight:[{type:t.Input}],dropTargetId:[{type:t.Input}],dragover:[{type:t.HostListener,args:["dragover",["$event"]]}],drop:[{type:t.HostListener,args:["drop",["$event"]]}],mousedown:[{type:t.HostListener,args:["mousedown",["$event"]]}],mousemove:[{type:t.HostListener,args:["mousemove",["$event"]]}],mouseup:[{type:t.HostListener,args:["mouseup",["$event"]]}]},e}();var I=function(){function e(e){this.elementRef=e}return e.prototype.ngOnInit=function(){$(this.elementRef.nativeElement).addClass(d.magnetClass)},e.prototype.dragover=function(e){return this.callbacks.edgeDragoverMagnet(e,this.connector)},e.prototype.dragleave=function(e){this.callbacks.edgeDragleaveMagnet(e)},e.prototype.drop=function(e){return this.callbacks.edgeDrop(e,this.connector)},e.prototype.dragend=function(e){this.callbacks.edgeDragend(e)},e.decorators=[{type:t.Directive,args:[{selector:"[fc-magnet]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={callbacks:[{type:t.Input}],connector:[{type:t.Input}],dragover:[{type:t.HostListener,args:["dragover",["$event"]]}],dragleave:[{type:t.HostListener,args:["dragleave",["$event"]]}],drop:[{type:t.HostListener,args:["drop",["$event"]]}],dragend:[{type:t.HostListener,args:["dragend",["$event"]]}]},e}();var A=function(){function e(e){this.elementRef=e}return e.prototype.ngOnInit=function(){var e=$(this.elementRef.nativeElement);e.addClass(d.connectorClass),this.modelservice.isEditable()&&(e.attr("draggable","true"),this.updateConnectorClass()),this.modelservice.connectors.setHtmlElement(this.connector.id,e[0])},e.prototype.ngOnChanges=function(e){var t,n,o=!1;try{for(var r=s(Object.keys(e)),i=r.next();!i.done;i=r.next()){var a=i.value,d=e[a];d.firstChange||d.currentValue===d.previousValue||"mouseOverConnector"===a&&(o=!0)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}o&&this.modelservice.isEditable()&&this.updateConnectorClass()},e.prototype.updateConnectorClass=function(){var e=$(this.elementRef.nativeElement);this.connector===this.mouseOverConnector?e.addClass(d.hoverClass):e.removeClass(d.hoverClass)},e.prototype.dragover=function(e){},e.prototype.drop=function(e){if(this.modelservice.isEditable())return this.callbacks.edgeDrop(e,this.connector)},e.prototype.dragend=function(e){this.modelservice.isEditable()&&this.callbacks.edgeDragend(e)},e.prototype.dragstart=function(e){this.modelservice.isEditable()&&this.callbacks.edgeDragstart(e,this.connector)},e.prototype.mouseenter=function(e){this.modelservice.isEditable()&&this.callbacks.connectorMouseEnter(e,this.connector)},e.prototype.mouseleave=function(e){this.modelservice.isEditable()&&this.callbacks.connectorMouseLeave(e,this.connector)},e.decorators=[{type:t.Directive,args:[{selector:"[fc-connector]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={callbacks:[{type:t.Input}],modelservice:[{type:t.Input}],connector:[{type:t.Input}],mouseOverConnector:[{type:t.Input}],dragover:[{type:t.HostListener,args:["dragover",["$event"]]}],drop:[{type:t.HostListener,args:["drop",["$event"]]}],dragend:[{type:t.HostListener,args:["dragend",["$event"]]}],dragstart:[{type:t.HostListener,args:["dragstart",["$event"]]}],mouseenter:[{type:t.HostListener,args:["mouseenter",["$event"]]}],mouseleave:[{type:t.HostListener,args:["mouseleave",["$event"]]}]},e}();var R=function(){function e(e,t,n){this.nodeComponentConfig=e,this.elementRef=t,this.componentFactoryResolver=n}return Object.defineProperty(e.prototype,"nodeId",{get:function(){return this.node.id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.node.y+"px"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this.node.x+"px"},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.userNodeCallbacks||(this.userNodeCallbacks={}),this.userNodeCallbacks.nodeEdit=this.userNodeCallbacks.nodeEdit||function(){},this.userNodeCallbacks.doubleClick=this.userNodeCallbacks.doubleClick||function(){},this.userNodeCallbacks.mouseDown=this.userNodeCallbacks.mouseDown||function(){},this.userNodeCallbacks.mouseEnter=this.userNodeCallbacks.mouseEnter||function(){},this.userNodeCallbacks.mouseLeave=this.userNodeCallbacks.mouseLeave||function(){};var e=$(this.elementRef.nativeElement);e.addClass(d.nodeClass),this.node.readonly||e.attr("draggable","true"),this.updateNodeClass(),this.modelservice.nodes.setHtmlElement(this.node.id,e[0]),this.nodeContentContainer.clear();var t=this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType),n=this.nodeContentContainer.createComponent(t);this.nodeComponent=n.instance,this.nodeComponent.callbacks=this.callbacks,this.nodeComponent.userNodeCallbacks=this.userNodeCallbacks,this.nodeComponent.node=this.node,this.nodeComponent.modelservice=this.modelservice,this.updateNodeComponent()},e.prototype.ngOnChanges=function(e){var t,n,o=!1;try{for(var r=s(Object.keys(e)),i=r.next();!i.done;i=r.next()){var a=i.value,d=e[a];d.firstChange||d.currentValue===d.previousValue||["selected","edit","underMouse","mouseOverConnector","dragging"].includes(a)&&(o=!0)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}o&&(this.updateNodeClass(),this.updateNodeComponent())},e.prototype.updateNodeClass=function(){var e=$(this.elementRef.nativeElement);this.toggleClass(e,d.selectedClass,this.selected),this.toggleClass(e,d.editClass,this.edit),this.toggleClass(e,d.hoverClass,this.underMouse),this.toggleClass(e,d.draggingClass,this.dragging)},e.prototype.updateNodeComponent=function(){this.nodeComponent.selected=this.selected,this.nodeComponent.edit=this.edit,this.nodeComponent.underMouse=this.underMouse,this.nodeComponent.mouseOverConnector=this.mouseOverConnector,this.nodeComponent.dragging=this.dragging},e.prototype.toggleClass=function(e,t,n){n?e.addClass(t):e.removeClass(t)},e.prototype.mousedown=function(e){e.stopPropagation()},e.prototype.dragstart=function(e){this.node.readonly||this.callbacks.nodeDragstart(e,this.node)},e.prototype.dragend=function(e){this.node.readonly||this.callbacks.nodeDragend(e)},e.prototype.click=function(e){this.node.readonly||this.callbacks.nodeClicked(e,this.node)},e.prototype.mouseover=function(e){this.node.readonly||this.callbacks.nodeMouseOver(e,this.node)},e.prototype.mouseout=function(e){this.node.readonly||this.callbacks.nodeMouseOut(e,this.node)},e.decorators=[{type:t.Component,args:[{selector:"fc-node",template:"",styles:[":host{position:absolute;z-index:1}:host.fc-dragging{z-index:10}:host ::ng-deep .fc-leftConnectors,:host ::ng-deep .fc-rightConnectors{position:absolute;top:0;height:100%;display:flex;flex-direction:column;z-index:-10}:host ::ng-deep .fc-leftConnectors .fc-magnet,:host ::ng-deep .fc-rightConnectors .fc-magnet{align-items:center}:host ::ng-deep .fc-leftConnectors{left:-20px}:host ::ng-deep .fc-rightConnectors{right:-20px}:host ::ng-deep .fc-magnet{display:flex;flex-grow:1;height:60px;justify-content:center}:host ::ng-deep .fc-connector{width:18px;height:18px;border:10px solid transparent;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box;border-radius:50%;background-color:#f7a789;color:#fff;pointer-events:all}:host ::ng-deep .fc-connector.fc-hover{background-color:#000}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[a]}]},{type:t.ElementRef},{type:t.ComponentFactoryResolver}]},e.propDecorators={callbacks:[{type:t.Input}],userNodeCallbacks:[{type:t.Input}],node:[{type:t.Input}],selected:[{type:t.Input}],edit:[{type:t.Input}],underMouse:[{type:t.Input}],mouseOverConnector:[{type:t.Input}],modelservice:[{type:t.Input}],dragging:[{type:t.Input}],nodeId:[{type:t.HostBinding,args:["attr.id"]}],top:[{type:t.HostBinding,args:["style.top"]}],left:[{type:t.HostBinding,args:["style.left"]}],nodeContentContainer:[{type:t.ViewChild,args:["nodeContent",{read:t.ViewContainerRef,static:!0}]}],mousedown:[{type:t.HostListener,args:["mousedown",["$event"]]}],dragstart:[{type:t.HostListener,args:["dragstart",["$event"]]}],dragend:[{type:t.HostListener,args:["dragend",["$event"]]}],click:[{type:t.HostListener,args:["click",["$event"]]}],mouseover:[{type:t.HostListener,args:["mouseover",["$event"]]}],mouseout:[{type:t.HostListener,args:["mouseout",["$event"]]}]},e}();var H=function(){function e(){this.flowchartConstants=d}return e.prototype.ngOnInit=function(){},e.propDecorators={callbacks:[{type:t.Input}],userNodeCallbacks:[{type:t.Input}],node:[{type:t.Input}],selected:[{type:t.Input}],edit:[{type:t.Input}],underMouse:[{type:t.Input}],mouseOverConnector:[{type:t.Input}],modelservice:[{type:t.Input}],dragging:[{type:t.Input}]},e}();var N=function(e){function n(){return e.call(this)||this}return i(n,e),n.decorators=[{type:t.Component,args:[{selector:"fc-default-node",template:'\n
\n
\n

{{ node.name }}

\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n ×\n
\n\n',styles:[":host .fc-node-overlay{position:absolute;pointer-events:none;left:0;top:0;right:0;bottom:0;background-color:#000;opacity:0}:host :host-context(.fc-hover) .fc-node-overlay{opacity:.25;transition:opacity .2s}:host :host-context(.fc-selected) .fc-node-overlay{opacity:.25}:host .innerNode{display:flex;justify-content:center;align-items:center;min-width:100px;border-radius:5px;background-color:#f15b26;color:#fff;font-size:16px;pointer-events:none}:host .innerNode p{padding:0 15px;text-align:center}"]}]}],n.ctorParameters=function(){return[]},n}(H),M={nodeComponentType:N},P=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{entryComponents:[N],declarations:[O,I,A,R,N],providers:[v,C,{provide:a,useValue:M}],imports:[o.CommonModule],exports:[O,I,A,N]}]}],e}();e.FC_NODE_COMPONENT_CONFIG=a,e.FcNodeComponent=H,e.FlowchartConstants=d,e.ModelvalidationError=l,e.NgxFlowchartComponent=O,e.NgxFlowchartModule=P,e.fcTopSort=c,e.ɵa=R,e.ɵb=v,e.ɵc=C,e.ɵd=N,e.ɵe=I,e.ɵf=A,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=ngx-flowchart.umd.min.js.map \ No newline at end of file diff --git a/dist/ngx-flowchart/bundles/ngx-flowchart.umd.min.js.map b/dist/ngx-flowchart/bundles/ngx-flowchart.umd.min.js.map index 04b7470..286735c 100644 --- a/dist/ngx-flowchart/bundles/ngx-flowchart.umd.min.js.map +++ b/dist/ngx-flowchart/bundles/ngx-flowchart.umd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["ng://ngx-flowchart/lib/ngx-flowchart.service.ts","ng://ngx-flowchart/lib/ngx-flowchart.component.ts","ng://ngx-flowchart/lib/ngx-flowchart.module.ts"],"names":["NgxFlowchartService","Injectable","args","providedIn","NgxFlowchartComponent","prototype","ngOnInit","Component","selector","template","NgxFlowchartModule","NgModule","declarations","imports","exports"],"mappings":"mRAAA,IAAAA,EAAA,WAOE,SAAAA,gCALDC,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,wJAHd,GCAAC,EAAA,WAaE,SAAAA,KAKF,OAHEA,EAAAC,UAAAC,SAAA,iCAbDC,EAAAA,UAASL,KAAA,CAAC,CACTM,SAAU,YACVC,SAAU,gGAcZL,EAlBA,GCAAM,EAAA,WAGA,SAAAA,KAMkC,2BANjCC,EAAAA,SAAQT,KAAA,CAAC,CACRU,aAAc,CAACR,GACfS,QAAS,GAETC,QAAS,CAACV,OAEsBM,EATlC","sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxFlowchartService {\n\n constructor() { }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'fc-canvas',\n template: `\n

\n ngx-flowchart works!\n

\n `,\n styles: []\n})\nexport class NgxFlowchartComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { NgxFlowchartComponent } from './ngx-flowchart.component';\n\n@NgModule({\n declarations: [NgxFlowchartComponent],\n imports: [\n ],\n exports: [NgxFlowchartComponent]\n})\nexport class NgxFlowchartModule { }\n"]} \ No newline at end of file +{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://ngx-flowchart/lib/ngx-flowchart.models.ts","ng://ngx-flowchart/lib/model.service.ts","ng://ngx-flowchart/lib/modelvalidation.service.ts","ng://ngx-flowchart/lib/node-dragging.service.ts","ng://ngx-flowchart/lib/edge-drawing.service.ts","ng://ngx-flowchart/lib/edge-dragging.service.ts","ng://ngx-flowchart/lib/mouseover.service.ts","ng://ngx-flowchart/lib/scrollparent.ts","ng://ngx-flowchart/lib/rectangleselect.service.ts","ng://ngx-flowchart/lib/ngx-flowchart.component.ts","ng://ngx-flowchart/lib/magnet.directive.ts","ng://ngx-flowchart/lib/connector.directive.ts","ng://ngx-flowchart/lib/node.component.ts","ng://ngx-flowchart/lib/default-node.component.ts","ng://ngx-flowchart/lib/ngx-flowchart.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__values","o","m","Symbol","iterator","i","call","next","length","value","done","FC_NODE_COMPONENT_CONFIG","InjectionToken","FlowchartConstants","htmlPrefix","leftConnectorType","rightConnectorType","curvedStyle","lineStyle","dragAnimationRepaint","dragAnimationShadow","canvasClass","selectedClass","editClass","activeClass","hoverClass","draggingClass","edgeClass","edgeLabelClass","connectorClass","magnetClass","nodeClass","nodeOverlayClass","leftConnectorClass","rightConnectorClass","canvasResizeThreshold","canvasResizeStep","ModelvalidationError","_super","message","tslib_1.__extends","Error","fcTopSort","graph","adjacentList","nodes","forEach","node","id","incoming","outgoing","edges","edge","sourceNode","filter","connectors","some","connector","source","destinationNode","destination","push","orderedNodes","sourceNodes","_c","tslib_1.__values","keys","_d","pop","splice","hasEdges","_e","_f","FcModelService","modelValidation","model","cd","selectedObjects","dropNode","createEdge","edgeAddedCallback","nodeRemovedCallback","edgeRemovedCallback","canvasHtmlElement","svgHtmlElement","connectorsHtmlElements","nodesHtmlElements","dragImage","validateModel","of","label","ConnectorsModel","NodesModel","EdgesModel","detectChanges","_this","setTimeout","selectObject","object","isEditable","indexOf","deselectObject","index","toggleSelectedObject","isSelectedObject","selectAll","readonly","select","deselectAll","isEditObject","inRectBox","x","y","rectBox","left","right","top","bottom","getItemInfoAtPoint","getNodeAtPoint","getEdgeAtPoint","_b","nodeElementBox","getHtmlElement","getBoundingClientRect","document","elementFromPoint","edgeIndex","startsWith","Number","substring","selectAllInRect","width","height","isSelected","deselect","canvasElementBox","start","sourceCoord","end","destCoord","deleteSelected","getSelectedEdges","delete","getSelectedNodes","undefined","dropTargetId","isDropSource","getDragImage","Image","src","style","visibility","registerCallbacks","AbstractFcModel","modelService","toggleSelected","isEdit","getConnector","connectorId","e_3","setHtmlElement","element","_getCoords","centered","canvas","connectorElementBox","coords","Math","round","offsetWidth","offsetHeight","getCoords","getCenteredCoord","getConnectorsByType","type","_addConnector","validateNode","error","connectorIds","getConnectorIds","handleClicked","ctrlKey","_addNode","validateNodes","map","getNodeByConnectorId","nodeId","ready","handleEdgeMouseClick","putEdge","_addEdge","event","sourceConnector","destConnector","validateConnector","validateEdges","concat","subscribe","created","FcModelValidationService","_validateEdges","ids","name","isArray","_validateEdge","edge1","index1","edge2","index2","validateEdge","Injectable","nodeDropScope","dropElement","FcNodeDraggingService","applyFunction","automaticResize","dragAnimation","nodeDraggingScope","shadowDragStarted","draggedNodes","shadowElements","dragOffsets","draggedElements","destinationHtmlElements","oldDisplayStyles","getCoordinate","coordinate","max","min","getXCoordinate","getYCoordinate","resizeCanvas","draggedNode","nodeElement","canvasElement","isDraggingNode","includes","dragstart","elements","selectedNodes","selectedNodes_1","selectedNodes_1_1","selectedNode","$","offsetsX","offsetsY","elements_1","elements_1_1","parseInt","css","clientX","clientY","originalEvent","parentNode","removeChild","cloneNode","offset","offsetInfo","offsetX","offsetY","position","pointerEvents","zIndex","body","appendChild","dropNodeInfo","dataTransfer","setData","JSON","stringify","setDragImage","target","display","dragOffset","shadowElement","targetInnerNode","children","backgroundColor","drop","preventDefault","infoText","getData","parse","e","dragover","dragend","replace","FcEdgeDrawingService","getEdgeDAttribute","pt1","pt2","dAddribute","sourceTangent","computeEdgeSourceTangent","destinationTangent","computeEdgeDestinationTangent","getEdgeCenter","computeEdgeTangentOffset","FcEdgeDraggingService","edgeDrawingService","isValidEdgeCallback","edgeStyle","edgeDragging","isDragging","dragPoint1","dragPoint2","draggedEdgeSource","destinationHtmlElement","oldDisplayStyle","swapConnector","dragLabel","prevEdge","this_1","gElement","querySelectorAll","pathElement","find","circleElement","attr","stopPropagation","magnetActive","dragoverConnector","dragleaveMagnet","dragoverMagnet","edge_1","targetConnector","FcMouseOverService","mouseoverscope","nodeMouseOver","nodeMouseOut","connectorMouseEnter","connectorMouseLeave","edgeMouseEnter","edgeMouseLeave","regex","prop","getComputedStyle","getPropertyValue","scroll","test","scrollparent","FcRectangleSelectService","selectElement","selectRect","x1","x2","y1","y2","$canvasElement","$scrollParent","mousedown","metaKey","button","hidden","pageX","pageY","updateSelectRect","mousemove","updateScroll","rect","topScroll","scroll_1","scrollTop","bottomScroll","scroll_2","leftScroll","scroll_3","scrollLeft","rightScroll","scroll_4","mouseup","selectObjects","x3","x4","y3","y4","NgxFlowchartComponent","elementRef","differs","zone","flowchartConstants","nodesDiffer","item","edgesDiffer","arrowDefId","random","arrowDefIdSelected","defineProperty","ngOnInit","nodeHeight","nodeWidth","userCallbacks","key","userNodeCallbacks","nodeCallbacks","nativeElement","edgeAdded","nodeRemoved","edgeRemoved","querySelector","run","bind","nodeDraggingService","edgeDraggingService","isValidEdge","mouseoverService","rectangleSelectService","callbacks","nodeDragstart","nodeDragend","edgeDragstart","edgeDragend","edgeDrop","edgeDragoverConnector","edgeDragoverMagnet","edgeDragleaveMagnet","nodeClicked","adjustCanvasSize","ngDoCheck","nodesChange","diff","edgesChange","nodesChanged_1","edgesChanged_1","forEachAddedItem","forEachRemovedItem","fit","maxX","maxY","canvasClick","edgeMouseDown","edgeClick","edgeRemove","edgeEdit","edgeDoubleClick","edgeMouseOver","Component","args","selector","template","changeDetection","ChangeDetectionStrategy","OnPush","ElementRef","IterableDiffers","ChangeDetectorRef","NgZone","HostBinding","Input","HostListener","FcMagnetDirective","addClass","dragleave","Directive","FcConnectorDirective","modelservice","updateConnectorClass","ngOnChanges","changes","updateConnector","propName","change","firstChange","currentValue","previousValue","mouseOverConnector","removeClass","mouseenter","mouseleave","FcNodeContainerComponent","nodeComponentConfig","componentFactoryResolver","nodeEdit","doubleClick","mouseDown","mouseEnter","mouseLeave","updateNodeClass","nodeContentContainer","clear","componentFactory","resolveComponentFactory","nodeComponentType","componentRef","createComponent","nodeComponent","instance","updateNodeComponent","updateNode","toggleClass","selected","edit","underMouse","dragging","clazz","set","click","mouseover","mouseout","Inject","ComponentFactoryResolver","ViewChild","read","ViewContainerRef","static","FcNodeComponent","DefaultFcNodeComponent","ɵ0$1","NgxFlowchartModule","NgModule","entryComponents","declarations","providers","provide","useValue","imports","CommonModule","exports"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAGrB,SAASO,EAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,YAAcX,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,GAkF5E,SAASK,EAASC,GACrB,IAAIC,EAAsB,mBAAXC,QAAyBF,EAAEE,OAAOC,UAAWC,EAAI,EAChE,OAAIH,EAAUA,EAAEI,KAAKL,GACd,CACHM,KAAM,WAEF,OADIN,GAAKI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A5f,UAAAuY,SAAA,gDA7BC4D,EAAAA,iCAGAA,EAAAA,oBAGAA,EAAAA,wBAGAA,EAAAA,oBAGAA,EAAAA,0BAGAA,EAAAA,kCAGAA,EAAAA,4BAGAA,EAAAA,wBAGAA,EAAAA,SAQHyD,EAlCA,qBCtLE,SAAAC,WACErd,EAAAhC,KAAAV,OAAOA,KAGX,OAN4C4C,EAAAA,EAAAA,uBAL3C6Y,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,kBACVC,SAAA,ugEASFmE,GAN4CD,GCR5CE,EAyBgB,CACRzB,kBAAmBwB,GAf3BE,EAAA,WAAA,SAAAA,KA2BkC,2BA3BjCC,EAAAA,SAAQxE,KAAA,CAAC,CACRyE,gBAAiB,CACfJ,GAEFK,aAAc,CAACvI,EACb0E,EACAI,EACAe,EACAqC,GACFM,UAAW,CACTzT,EACAwF,EACA,CACEkO,QAASvf,EACTwf,SAAQP,IAKZQ,QAAS,CACPC,EAAAA,cAEFC,QAAS,CAAC7I,EACR0E,EACAI,EACAoD,OAE8BE,EA3BlC","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Observable } from 'rxjs';\nimport { InjectionToken, Type } from '@angular/core';\nimport { FcNodeComponent } from './node.component';\n\nexport const FC_NODE_COMPONENT_CONFIG = new InjectionToken('fc-node.component.config');\n\nexport interface FcNodeComponentConfig {\n nodeComponentType: Type;\n}\n\nconst htmlPrefix = 'fc';\nconst leftConnectorType = 'leftConnector';\nconst rightConnectorType = 'rightConnector';\n\nexport const FlowchartConstants = {\n htmlPrefix,\n leftConnectorType,\n rightConnectorType,\n curvedStyle: 'curved',\n lineStyle: 'line',\n dragAnimationRepaint: 'repaint',\n dragAnimationShadow: 'shadow',\n canvasClass: htmlPrefix + '-canvas',\n selectedClass: htmlPrefix + '-selected',\n editClass: htmlPrefix + '-edit',\n activeClass: htmlPrefix + '-active',\n hoverClass: htmlPrefix + '-hover',\n draggingClass: htmlPrefix + '-dragging',\n edgeClass: htmlPrefix + '-edge',\n edgeLabelClass: htmlPrefix + '-edge-label',\n connectorClass: htmlPrefix + '-connector',\n magnetClass: htmlPrefix + '-magnet',\n nodeClass: htmlPrefix + '-node',\n nodeOverlayClass: htmlPrefix + '-node-overlay',\n leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's',\n rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's',\n canvasResizeThreshold: 200,\n canvasResizeStep: 200\n};\n\n\nexport interface FcCoords {\n x?: number;\n y?: number;\n}\n\nexport interface FcOffset {\n top: number;\n left: number;\n}\n\nexport interface FcRectBox {\n top: number;\n left: number;\n right: number;\n bottom: number;\n}\n\nexport interface FcConnector {\n id: string;\n type: string;\n}\n\nexport interface FcNode extends FcCoords {\n id: string;\n name: string;\n connectors: Array;\n readonly?: boolean;\n [key: string]: any;\n}\n\nexport interface FcEdge {\n label?: string;\n source?: string;\n destination?: string;\n active?: boolean;\n}\n\nexport interface FcItemInfo {\n node?: FcNode;\n edge?: FcEdge;\n}\n\nexport interface FcModel {\n nodes: Array;\n edges: Array;\n}\n\nexport interface UserCallbacks {\n dropNode?: (event: Event, node: FcNode) => void;\n createEdge?: (event: Event, edge: FcEdge) => Observable;\n edgeAdded?: (edge: FcEdge) => void;\n nodeRemoved?: (node: FcNode) => void;\n edgeRemoved?: (edge: FcEdge) => void;\n edgeDoubleClick?: (event: MouseEvent, edge: FcEdge) => void;\n edgeMouseOver?: (event: MouseEvent, edge: FcEdge) => void;\n isValidEdge?: (source: FcConnector, destination: FcConnector) => boolean;\n edgeEdit?: (event: Event, edge: FcEdge) => void;\n nodeCallbacks?: UserNodeCallbacks;\n}\n\nexport interface UserNodeCallbacks {\n nodeEdit?: (event: MouseEvent, node: FcNode) => void;\n doubleClick?: (event: MouseEvent, node: FcNode) => void;\n mouseDown?: (event: MouseEvent, node: FcNode) => void;\n mouseEnter?: (event: MouseEvent, node: FcNode) => void;\n mouseLeave?: (event: MouseEvent, node: FcNode) => void;\n}\n\nexport interface FcCallbacks {\n nodeDragstart: (event: DragEvent, node: FcNode) => void;\n nodeDragend: (event: DragEvent) => void;\n edgeDragstart: (event: DragEvent, connector: FcConnector) => void;\n edgeDragend: (event: DragEvent) => void;\n edgeDrop: (event: DragEvent, targetConnector: FcConnector) => boolean;\n edgeDragoverConnector: (event: DragEvent, connector: FcConnector) => boolean;\n edgeDragoverMagnet: (event: DragEvent, connector: FcConnector) => boolean;\n edgeDragleaveMagnet: (event: DragEvent) => void;\n nodeMouseOver: (event: MouseEvent, node: FcNode) => void;\n nodeMouseOut: (event: MouseEvent, node: FcNode) => void;\n connectorMouseEnter: (event: MouseEvent, connector: FcConnector) => void;\n connectorMouseLeave: (event: MouseEvent, connector: FcConnector) => void;\n nodeClicked: (event: MouseEvent, node: FcNode) => void;\n}\n\nexport interface FcAdjacentList {\n [id: string]: {\n incoming: number;\n outgoing: Array;\n };\n}\n\nexport class ModelvalidationError extends Error {\n constructor(message: string) {\n super(message);\n }\n}\n\nexport function fcTopSort(graph: FcModel): Array | null {\n const adjacentList: FcAdjacentList = {};\n graph.nodes.forEach((node) => {\n adjacentList[node.id] = {incoming: 0, outgoing: []};\n });\n graph.edges.forEach((edge) => {\n const sourceNode = graph.nodes.filter((node) => {\n return node.connectors.some((connector) => {\n return connector.id === edge.source;\n });\n })[0];\n const destinationNode = graph.nodes.filter((node) => {\n return node.connectors.some((connector) => {\n return connector.id === edge.destination;\n });\n })[0];\n adjacentList[sourceNode.id].outgoing.push(destinationNode.id);\n adjacentList[destinationNode.id].incoming++;\n });\n const orderedNodes: string[] = [];\n const sourceNodes: string[] = [];\n for (const node of Object.keys(adjacentList)) {\n const edges = adjacentList[node];\n if (edges.incoming === 0) {\n sourceNodes.push(node);\n }\n }\n while (sourceNodes.length !== 0) {\n const sourceNode = sourceNodes.pop();\n for (let i = 0; i < adjacentList[sourceNode].outgoing.length; i++) {\n const destinationNode = adjacentList[sourceNode].outgoing[i];\n adjacentList[destinationNode].incoming--;\n if (adjacentList[destinationNode].incoming === 0) {\n sourceNodes.push(destinationNode);\n }\n adjacentList[sourceNode].outgoing.splice(i, 1);\n i--;\n }\n orderedNodes.push(sourceNode);\n }\n let hasEdges = false;\n for (const node of Object.keys(adjacentList)) {\n const edges = adjacentList[node];\n if (edges.incoming !== 0) {\n hasEdges = true;\n }\n }\n if (hasEdges) {\n return null;\n } else {\n return orderedNodes;\n }\n}\n","import { FcModelValidationService } from './modelvalidation.service';\nimport { FcConnector, FcCoords, FcEdge, FcItemInfo, FcModel, FcNode, FcRectBox } from './ngx-flowchart.models';\nimport { Observable, of } from 'rxjs';\nimport { ChangeDetectorRef } from '@angular/core';\n\nexport class FcModelService {\n\n modelValidation: FcModelValidationService;\n model: FcModel;\n cd: ChangeDetectorRef;\n selectedObjects: any[];\n\n connectorsHtmlElements: HtmlElementMap = {};\n nodesHtmlElements: HtmlElementMap = {};\n canvasHtmlElement: HTMLElement = null;\n dragImage: HTMLImageElement = null;\n svgHtmlElement: SVGElement = null;\n\n dropNode: (event: Event, node: FcNode) => void;\n createEdge: (event: Event, edge: FcEdge) => Observable;\n edgeAddedCallback: (edge: FcEdge) => void;\n nodeRemovedCallback: (node: FcNode) => void;\n edgeRemovedCallback: (edge: FcEdge) => void;\n\n dropTargetId: string;\n\n connectors: ConnectorsModel;\n nodes: NodesModel;\n edges: EdgesModel;\n\n constructor(modelValidation: FcModelValidationService,\n model: FcModel,\n cd: ChangeDetectorRef,\n selectedObjects: any[],\n dropNode: (event: Event, node: FcNode) => void,\n createEdge: (event: Event, edge: FcEdge) => Observable,\n edgeAddedCallback: (edge: FcEdge) => void,\n nodeRemovedCallback: (node: FcNode) => void,\n edgeRemovedCallback: (edge: FcEdge) => void,\n canvasHtmlElement: HTMLElement,\n svgHtmlElement: SVGElement) {\n\n this.modelValidation = modelValidation;\n this.model = model;\n this.cd = cd;\n this.canvasHtmlElement = canvasHtmlElement;\n this.svgHtmlElement = svgHtmlElement;\n this.modelValidation.validateModel(this.model);\n this.selectedObjects = selectedObjects;\n\n this.dropNode = dropNode || (() => {});\n this.createEdge = createEdge || (() => of({label: 'label'}));\n this.edgeAddedCallback = edgeAddedCallback || (() => {});\n this.nodeRemovedCallback = nodeRemovedCallback || (() => {});\n this.edgeRemovedCallback = edgeRemovedCallback || (() => {});\n\n this.connectors = new ConnectorsModel(this);\n this.nodes = new NodesModel(this);\n this.edges = new EdgesModel(this);\n }\n\n public detectChanges() {\n setTimeout(() => {\n this.cd.detectChanges();\n }, 0);\n }\n\n public selectObject(object: any) {\n if (this.isEditable()) {\n if (this.selectedObjects.indexOf(object) === -1) {\n this.selectedObjects.push(object);\n }\n }\n }\n\n public deselectObject(object: any) {\n if (this.isEditable()) {\n const index = this.selectedObjects.indexOf(object);\n if (index === -1) {\n throw new Error('Tried to deselect an unselected object');\n }\n this.selectedObjects.splice(index, 1);\n }\n }\n\n public toggleSelectedObject(object: any) {\n if (this.isSelectedObject(object)) {\n this.deselectObject(object);\n } else {\n this.selectObject(object);\n }\n }\n\n public isSelectedObject(object: any): boolean {\n return this.selectedObjects.indexOf(object) !== -1;\n }\n\n public selectAll() {\n this.model.nodes.forEach(node => {\n if (!node.readonly) {\n this.nodes.select(node);\n }\n });\n this.model.edges.forEach(edge => {\n this.edges.select(edge);\n });\n this.detectChanges();\n }\n\n public deselectAll() {\n this.selectedObjects.splice(0, this.selectedObjects.length);\n this.detectChanges();\n }\n\n public isEditObject(object: any): boolean {\n return this.selectedObjects.length === 1 &&\n this.selectedObjects.indexOf(object) !== -1;\n }\n\n private inRectBox(x: number, y: number, rectBox: FcRectBox): boolean {\n return x >= rectBox.left && x <= rectBox.right &&\n y >= rectBox.top && y <= rectBox.bottom;\n }\n\n public getItemInfoAtPoint(x: number, y: number): FcItemInfo {\n return {\n node: this.getNodeAtPoint(x, y),\n edge: this.getEdgeAtPoint(x, y)\n };\n }\n\n public getNodeAtPoint(x: number, y: number): FcNode {\n for (const node of this.model.nodes) {\n const element = this.nodes.getHtmlElement(node.id);\n const nodeElementBox = element.getBoundingClientRect();\n if (x >= nodeElementBox.left && x <= nodeElementBox.right\n && y >= nodeElementBox.top && y <= nodeElementBox.bottom) {\n return node;\n }\n }\n return null;\n }\n\n public getEdgeAtPoint(x: number, y: number): FcEdge {\n const element = document.elementFromPoint(x, y);\n const id = element.id;\n let edgeIndex = -1;\n if (id) {\n if (id.startsWith('fc-edge-path-')) {\n edgeIndex = Number(id.substring('fc-edge-path-'.length));\n } else if (id.startsWith('fc-edge-label-')) {\n edgeIndex = Number(id.substring('fc-edge-label-'.length));\n }\n }\n if (edgeIndex > -1) {\n return this.model.edges[edgeIndex];\n }\n return null;\n }\n\n public selectAllInRect(rectBox: FcRectBox) {\n this.model.nodes.forEach((value) => {\n const element = this.nodes.getHtmlElement(value.id);\n const nodeElementBox = element.getBoundingClientRect();\n if (!value.readonly) {\n const x = nodeElementBox.left + nodeElementBox.width / 2;\n const y = nodeElementBox.top + nodeElementBox.height / 2;\n if (this.inRectBox(x, y, rectBox)) {\n this.nodes.select(value);\n } else {\n if (this.nodes.isSelected(value)) {\n this.nodes.deselect(value);\n }\n }\n }\n });\n const canvasElementBox = this.canvasHtmlElement.getBoundingClientRect();\n this.model.edges.forEach((value) => {\n const start = this.edges.sourceCoord(value);\n const end = this.edges.destCoord(value);\n const x = (start.x + end.x) / 2 + canvasElementBox.left;\n const y = (start.y + end.y) / 2 + canvasElementBox.top;\n if (this.inRectBox(x, y, rectBox)) {\n this.edges.select(value);\n } else {\n if (this.edges.isSelected(value)) {\n this.edges.deselect(value);\n }\n }\n });\n }\n\n public deleteSelected() {\n const edgesToDelete = this.edges.getSelectedEdges();\n edgesToDelete.forEach((edge) => {\n this.edges.delete(edge);\n });\n const nodesToDelete = this.nodes.getSelectedNodes();\n nodesToDelete.forEach((node) => {\n this.nodes.delete(node);\n });\n }\n\n public isEditable(): boolean {\n return this.dropTargetId === undefined;\n }\n\n public isDropSource(): boolean {\n return this.dropTargetId !== undefined;\n }\n\n public getDragImage(): HTMLImageElement {\n if (!this.dragImage) {\n this.dragImage = new Image();\n this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n this.dragImage.style.visibility = 'hidden';\n }\n return this.dragImage;\n }\n\n public registerCallbacks(edgeAddedCallback: (edge: FcEdge) => void,\n nodeRemovedCallback: (node: FcNode) => void,\n edgeRemovedCallback: (edge: FcEdge) => void) {\n this.edgeAddedCallback = edgeAddedCallback;\n this.nodeRemovedCallback = nodeRemovedCallback;\n this.edgeRemovedCallback = edgeRemovedCallback;\n }\n\n}\n\ninterface HtmlElementMap { [id: string]: HTMLElement; }\n\nabstract class AbstractFcModel {\n\n modelService: FcModelService;\n\n protected constructor(modelService: FcModelService) {\n this.modelService = modelService;\n }\n\n public select(object: T) {\n this.modelService.selectObject(object);\n }\n\n public deselect(object: T) {\n this.modelService.deselectObject(object);\n }\n\n public toggleSelected(object: T) {\n this.modelService.toggleSelectedObject(object);\n }\n\n public isSelected(object: T): boolean {\n return this.modelService.isSelectedObject(object);\n }\n\n public isEdit(object: T): boolean {\n return this.modelService.isEditObject(object);\n }\n}\n\nclass ConnectorsModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public getConnector(connectorId: string): FcConnector {\n const model = this.modelService.model;\n for (const node of model.nodes) {\n for (const connector of node.connectors) {\n if (connector.id === connectorId) {\n return connector;\n }\n }\n }\n }\n\n public getHtmlElement(connectorId: string): HTMLElement {\n return this.modelService.connectorsHtmlElements[connectorId];\n }\n\n public setHtmlElement(connectorId: string, element: HTMLElement) {\n this.modelService.connectorsHtmlElements[connectorId] = element;\n this.modelService.detectChanges();\n }\n\n private _getCoords(connectorId: string, centered?: boolean): FcCoords {\n const element = this.getHtmlElement(connectorId);\n const canvas = this.modelService.canvasHtmlElement;\n if (element === null || element === undefined || canvas === null) {\n return {x: 0, y: 0};\n }\n const connectorElementBox = element.getBoundingClientRect();\n const canvasElementBox = canvas.getBoundingClientRect();\n let coords: FcCoords = {\n x: connectorElementBox.left - canvasElementBox.left,\n y: connectorElementBox.top - canvasElementBox.top\n };\n if (centered) {\n coords = {\n x: Math.round(coords.x + element.offsetWidth / 2),\n y: Math.round(coords.y + element.offsetHeight / 2)\n };\n }\n return coords;\n }\n\n public getCoords(connectorId: string): FcCoords {\n return this._getCoords(connectorId, false);\n }\n\n public getCenteredCoord(connectorId: string): FcCoords {\n return this._getCoords(connectorId, true);\n }\n}\n\nclass NodesModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public getConnectorsByType(node: FcNode, type: string): Array {\n return node.connectors.filter((connector) => {\n return connector.type === type;\n });\n }\n\n private _addConnector(node: FcNode, connector: FcConnector) {\n node.connectors.push(connector);\n try {\n this.modelService.modelValidation.validateNode(node);\n } catch (error) {\n node.connectors.splice(node.connectors.indexOf(connector), 1);\n throw error;\n }\n }\n\n public delete(node: FcNode) {\n if (this.isSelected(node)) {\n this.deselect(node);\n }\n const model = this.modelService.model;\n const index = model.nodes.indexOf(node);\n if (index === -1) {\n if (node === undefined) {\n throw new Error('Passed undefined');\n }\n throw new Error('Tried to delete not existing node');\n }\n const connectorIds = this.getConnectorIds(node);\n for (let i = 0; i < model.edges.length; i++) {\n const edge = model.edges[i];\n if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) {\n this.modelService.edges.delete(edge);\n i--;\n }\n }\n model.nodes.splice(index, 1);\n this.modelService.nodeRemovedCallback(node);\n }\n\n public getSelectedNodes(): Array {\n const model = this.modelService.model;\n return model.nodes.filter((node) => {\n return this.modelService.nodes.isSelected(node);\n });\n }\n\n public handleClicked(node: FcNode, ctrlKey?: boolean) {\n if (ctrlKey) {\n this.modelService.nodes.toggleSelected(node);\n } else {\n this.modelService.deselectAll();\n this.modelService.nodes.select(node);\n }\n }\n\n private _addNode(node: FcNode) {\n const model = this.modelService.model;\n try {\n model.nodes.push(node);\n this.modelService.modelValidation.validateNodes(model.nodes);\n } catch (error) {\n model.nodes.splice(model.nodes.indexOf(node), 1);\n throw error;\n }\n }\n\n public getConnectorIds(node: FcNode): Array {\n return node.connectors.map((connector) => {\n return connector.id;\n });\n }\n\n public getNodeByConnectorId(connectorId: string): FcNode {\n const model = this.modelService.model;\n for (const node of model.nodes) {\n const connectorIds = this.getConnectorIds(node);\n if (connectorIds.indexOf(connectorId) > -1) {\n return node;\n }\n }\n return null;\n }\n\n public getHtmlElement(nodeId: string): HTMLElement {\n return this.modelService.nodesHtmlElements[nodeId];\n }\n\n public setHtmlElement(nodeId: string, element: HTMLElement) {\n this.modelService.nodesHtmlElements[nodeId] = element;\n this.modelService.detectChanges();\n }\n\n}\n\nclass EdgesModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public ready(edge: FcEdge): boolean {\n const source = this.modelService.connectors.getHtmlElement(edge.source);\n const destination = this.modelService.connectors.getHtmlElement(edge.destination);\n return source !== undefined && destination !== undefined;\n }\n\n public sourceCoord(edge: FcEdge): FcCoords {\n return this.modelService.connectors.getCenteredCoord(edge.source);\n }\n\n public destCoord(edge: FcEdge): FcCoords {\n return this.modelService.connectors.getCenteredCoord(edge.destination);\n }\n\n public delete(edge: FcEdge) {\n const model = this.modelService.model;\n const index = model.edges.indexOf(edge);\n if (index === -1) {\n throw new Error('Tried to delete not existing edge');\n }\n if (this.isSelected(edge)) {\n this.deselect(edge);\n }\n model.edges.splice(index, 1);\n this.modelService.edgeRemovedCallback(edge);\n }\n\n public getSelectedEdges(): Array {\n const model = this.modelService.model;\n return model.edges.filter((edge) => {\n return this.modelService.edges.isSelected(edge);\n });\n }\n\n public handleEdgeMouseClick(edge: FcEdge, ctrlKey?: boolean) {\n if (ctrlKey) {\n this.modelService.edges.toggleSelected(edge);\n } else {\n this.modelService.deselectAll();\n this.modelService.edges.select(edge);\n }\n }\n\n public putEdge(edge: FcEdge) {\n const model = this.modelService.model;\n model.edges.push(edge);\n }\n\n public _addEdge(event: Event, sourceConnector: FcConnector, destConnector: FcConnector, label: string) {\n this.modelService.modelValidation.validateConnector(sourceConnector);\n this.modelService.modelValidation.validateConnector(destConnector);\n const edge: FcEdge = {};\n edge.source = sourceConnector.id;\n edge.destination = destConnector.id;\n edge.label = label;\n const model = this.modelService.model;\n this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes);\n this.modelService.createEdge(event, edge).subscribe(\n (created) => {\n model.edges.push(created);\n this.modelService.edgeAddedCallback(created);\n }\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { FcConnector, FcEdge, FcModel, FcNode, fcTopSort, ModelvalidationError } from './ngx-flowchart.models';\n\n@Injectable()\nexport class FcModelValidationService {\n\n constructor() { }\n\n public validateModel(model: FcModel): FcModel {\n this.validateNodes(model.nodes);\n this._validateEdges(model.edges, model.nodes);\n return model;\n }\n\n public validateNodes(nodes: Array): Array {\n const ids: string[] = [];\n nodes.forEach((node) => {\n this.validateNode(node);\n if (ids.indexOf(node.id) !== -1) {\n throw new ModelvalidationError('Id not unique.');\n }\n ids.push(node.id);\n });\n const connectorIds: string[] = [];\n nodes.forEach((node) => {\n node.connectors.forEach((connector) => {\n if (connectorIds.indexOf(connector.id) !== -1) {\n throw new ModelvalidationError('Id not unique.');\n }\n connectorIds.push(connector.id);\n });\n });\n return nodes;\n }\n\n public validateNode(node: FcNode): FcNode {\n if (node.id === undefined) {\n throw new ModelvalidationError('Id not valid.');\n }\n if (typeof node.name !== 'string') {\n throw new ModelvalidationError('Name not valid.');\n }\n if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) {\n throw new ModelvalidationError('Coordinates not valid.');\n }\n if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) {\n throw new ModelvalidationError('Coordinates not valid.');\n }\n if (!Array.isArray(node.connectors)) {\n throw new ModelvalidationError('Connectors not valid.');\n }\n node.connectors.forEach((connector) => {\n this.validateConnector(connector);\n });\n return node;\n }\n\n private _validateEdges(edges: Array, nodes: Array): Array {\n edges.forEach((edge) => {\n this._validateEdge(edge, nodes);\n });\n edges.forEach((edge1, index1) => {\n edges.forEach((edge2, index2) => {\n if (index1 !== index2) {\n if ((edge1.source === edge2.source && edge1.destination === edge2.destination) ||\n (edge1.source === edge2.destination && edge1.destination === edge2.source)) {\n throw new ModelvalidationError('Duplicated edge.');\n }\n }\n });\n });\n if (fcTopSort({nodes, edges}) === null) {\n throw new ModelvalidationError('Graph has a circle.');\n }\n return edges;\n }\n\n public validateEdges(edges: Array, nodes: Array): Array {\n this.validateNodes(nodes);\n return this._validateEdges(edges, nodes);\n }\n\n private _validateEdge(edge: FcEdge, nodes: Array): FcEdge {\n if (edge.source === undefined) {\n throw new ModelvalidationError('Source not valid.');\n }\n if (edge.destination === undefined) {\n throw new ModelvalidationError('Destination not valid.');\n }\n if (edge.source === edge.destination) {\n throw new ModelvalidationError('Edge with same source and destination connectors.');\n }\n const sourceNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.source))[0];\n if (sourceNode === undefined) {\n throw new ModelvalidationError('Source not valid.');\n }\n const destinationNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.destination))[0];\n if (destinationNode === undefined) {\n throw new ModelvalidationError('Destination not valid.');\n }\n if (sourceNode === destinationNode) {\n throw new ModelvalidationError('Edge with same source and destination nodes.');\n }\n return edge;\n }\n\n public validateEdge(edge: FcEdge, nodes: Array): FcEdge {\n this.validateNodes(nodes);\n return this._validateEdge(edge, nodes);\n }\n\n public validateConnector(connector: FcConnector): FcConnector {\n if (connector.id === undefined) {\n throw new ModelvalidationError('Id not valid.');\n }\n if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') {\n throw new ModelvalidationError('Type not valid.');\n }\n return connector;\n }\n\n}\n","import { FcModelService } from './model.service';\nimport { FcCoords, FcNode, FlowchartConstants } from './ngx-flowchart.models';\n\nconst nodeDropScope: NodeDropScope = {\n dropElement: null\n};\n\nexport class FcNodeDraggingService {\n\n nodeDraggingScope: NodeDraggingScope = {\n shadowDragStarted: false,\n dropElement: null,\n draggedNodes: [],\n shadowElements: []\n };\n\n private dragOffsets: FcCoords[] = [];\n private draggedElements: HTMLElement[] = [];\n\n private destinationHtmlElements: HTMLElement[] = [];\n private oldDisplayStyles: string[] = [];\n\n private readonly modelService: FcModelService;\n private readonly automaticResize: boolean;\n private readonly dragAnimation: string;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(modelService: FcModelService,\n applyFunction: (fn: (...args: any[]) => T) => T,\n automaticResize: boolean, dragAnimation: string) {\n this.modelService = modelService;\n this.automaticResize = automaticResize;\n this.dragAnimation = dragAnimation;\n this.applyFunction = applyFunction;\n }\n\n private getCoordinate(coordinate: number, max: number): number {\n coordinate = Math.max(coordinate, 0);\n coordinate = Math.min(coordinate, max);\n return coordinate;\n }\n\n private getXCoordinate(x: number): number {\n return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth);\n }\n\n private getYCoordinate(y: number): number {\n return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight);\n }\n\n private resizeCanvas(draggedNode: FcNode, nodeElement: HTMLElement) {\n if (this.automaticResize && !this.modelService.isDropSource()) {\n const canvasElement = this.modelService.canvasHtmlElement;\n if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) {\n canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px';\n }\n if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) {\n canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px';\n }\n }\n }\n\n public isDraggingNode(node: FcNode): boolean {\n return this.nodeDraggingScope.draggedNodes.includes(node);\n }\n\n public dragstart(event: DragEvent, node: FcNode) {\n if (node.readonly) {\n return;\n }\n this.dragOffsets.length = 0;\n this.draggedElements.length = 0;\n this.nodeDraggingScope.draggedNodes.length = 0;\n this.nodeDraggingScope.shadowElements.length = 0;\n this.destinationHtmlElements.length = 0;\n this.oldDisplayStyles.length = 0;\n const elements: Array> = [];\n const nodes: Array = [];\n if (this.modelService.nodes.isSelected(node)) {\n const selectedNodes = this.modelService.nodes.getSelectedNodes();\n for (const selectedNode of selectedNodes) {\n const element = $(this.modelService.nodes.getHtmlElement(selectedNode.id));\n elements.push(element);\n nodes.push(selectedNode);\n }\n } else {\n elements.push($(event.target as HTMLElement));\n nodes.push(node);\n }\n const offsetsX: number[] = [];\n const offsetsY: number[] = [];\n for (const element of elements) {\n offsetsX.push(parseInt(element.css('left'), 10) - event.clientX);\n offsetsY.push(parseInt(element.css('top'), 10) - event.clientY);\n }\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n if (this.modelService.isDropSource()) {\n if (nodeDropScope.dropElement) {\n nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement);\n nodeDropScope.dropElement = null;\n }\n nodeDropScope.dropElement = elements[0][0].cloneNode(true) as NodeDropElement;\n const offset = $(this.modelService.canvasHtmlElement).offset();\n nodeDropScope.dropElement.offsetInfo = {\n offsetX: Math.round(offsetsX[0] + offset.left),\n offsetY: Math.round(offsetsY[0] + offset.top)\n };\n nodeDropScope.dropElement.style.position = 'absolute';\n nodeDropScope.dropElement.style.pointerEvents = 'none';\n nodeDropScope.dropElement.style.zIndex = '9999';\n\n document.body.appendChild(nodeDropScope.dropElement);\n const dropNodeInfo: DropNodeInfo = {\n node,\n dropTargetId: this.modelService.dropTargetId,\n offsetX: Math.round(offsetsX[0] + offset.left),\n offsetY: Math.round(offsetsY[0] + offset.top)\n };\n originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo));\n\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n const target: HTMLElement = event.target as HTMLElement;\n this.destinationHtmlElements.push(target);\n this.oldDisplayStyles.push(target.style.display);\n target.style.display = 'none';\n this.nodeDraggingScope.shadowDragStarted = true;\n }\n return;\n }\n this.nodeDraggingScope.draggedNodes = nodes;\n for (let i = 0; i < elements.length; i++) {\n this.draggedElements.push(elements[i][0]);\n this.dragOffsets.push(\n {\n x: offsetsX[i],\n y: offsetsY[i]\n }\n );\n }\n\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n for (let i = 0; i < this.draggedElements.length; i++) {\n const dragOffset = this.dragOffsets[i];\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const shadowElement = $(`
` +\n `

${draggedNode.name}

`);\n const targetInnerNode = $(this.draggedElements[i]).children()[0];\n shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor;\n this.nodeDraggingScope.shadowElements.push(shadowElement);\n this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]);\n }\n }\n originalEvent.dataTransfer.setData('text', 'Just to support firefox');\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n for (let i = 0; i < this.draggedElements.length; i++) {\n this.destinationHtmlElements.push(this.draggedElements[i]);\n this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);\n this.destinationHtmlElements[i].style.display = 'none';\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.nodeDraggingScope.shadowDragStarted = true;\n }\n }\n }\n\n public drop(event: DragEvent): boolean {\n if (this.modelService.isDropSource()) {\n event.preventDefault();\n return false;\n }\n let dropNode: FcNode = null;\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n const infoText = originalEvent.dataTransfer.getData('text');\n if (infoText) {\n let dropNodeInfo: DropNodeInfo = null;\n try {\n dropNodeInfo = JSON.parse(infoText);\n } catch (e) {}\n if (dropNodeInfo && dropNodeInfo.dropTargetId) {\n if (this.modelService.canvasHtmlElement.id &&\n this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) {\n dropNode = dropNodeInfo.node;\n const offset = $(this.modelService.canvasHtmlElement).offset();\n const x = event.clientX - offset.left;\n const y = event.clientY - offset.top;\n dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x));\n dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y));\n }\n }\n }\n if (dropNode) {\n this.modelService.dropNode(event, dropNode);\n event.preventDefault();\n return false;\n } else if (this.nodeDraggingScope.draggedNodes.length) {\n return this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n draggedNode.x = Math.round(this.getXCoordinate(dragOffset.x + event.clientX));\n draggedNode.y = Math.round(this.getYCoordinate(dragOffset.y + event.clientY));\n }\n event.preventDefault();\n return false;\n });\n }\n }\n\n public dragover(event: DragEvent) {\n if (nodeDropScope.dropElement) {\n const offsetInfo = nodeDropScope.dropElement.offsetInfo;\n nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px';\n nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px';\n if (this.nodeDraggingScope.shadowDragStarted) {\n this.applyFunction(() => {\n this.destinationHtmlElements[0].style.display = this.oldDisplayStyles[0];\n this.nodeDraggingScope.shadowDragStarted = false;\n });\n }\n event.preventDefault();\n return;\n }\n if (this.modelService.isDropSource()) {\n event.preventDefault();\n return;\n }\n if (!this.nodeDraggingScope.draggedNodes.length) {\n event.preventDefault();\n return;\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n if (this.nodeDraggingScope.draggedNodes.length) {\n return this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n draggedNode.x = this.getXCoordinate(dragOffset.x + event.clientX);\n draggedNode.y = this.getYCoordinate(dragOffset.y + event.clientY);\n this.resizeCanvas(draggedNode, this.draggedElements[i]);\n }\n event.preventDefault();\n return false;\n });\n }\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.nodeDraggingScope.draggedNodes.length) {\n if (this.nodeDraggingScope.shadowDragStarted) {\n this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n this.destinationHtmlElements[i].style.display = this.oldDisplayStyles[i];\n }\n this.nodeDraggingScope.shadowDragStarted = false;\n });\n }\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px');\n this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px');\n this.resizeCanvas(draggedNode, this.draggedElements[i]);\n }\n event.preventDefault();\n }\n }\n }\n\n public dragend(event: DragEvent) {\n this.applyFunction(() => {\n if (nodeDropScope.dropElement) {\n nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement);\n nodeDropScope.dropElement = null;\n }\n if (this.modelService.isDropSource()) {\n return;\n }\n if (this.nodeDraggingScope.shadowElements.length) {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const shadowElement = this.nodeDraggingScope.shadowElements[i];\n draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10);\n draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10);\n this.modelService.canvasHtmlElement.removeChild(shadowElement[0]);\n }\n this.nodeDraggingScope.shadowElements.length = 0;\n }\n\n if (this.nodeDraggingScope.draggedNodes.length) {\n this.nodeDraggingScope.draggedNodes.length = 0;\n this.draggedElements.length = 0;\n this.dragOffsets.length = 0;\n }\n });\n }\n\n}\n\nexport interface NodeDraggingScope {\n draggedNodes: Array;\n shadowElements: Array>;\n shadowDragStarted: boolean;\n dropElement: HTMLElement;\n}\n\nexport interface NodeDropElement extends HTMLElement {\n offsetInfo?: {\n offsetX: number;\n offsetY: number;\n };\n}\n\nexport interface NodeDropScope {\n dropElement: NodeDropElement;\n}\n\nexport interface DropNodeInfo {\n node: FcNode;\n dropTargetId: string;\n offsetX: number;\n offsetY: number;\n}\n","import { Injectable } from '@angular/core';\nimport { FcCoords, FlowchartConstants } from './ngx-flowchart.models';\n\n@Injectable()\nexport class FcEdgeDrawingService {\n\n constructor() {\n }\n\n public getEdgeDAttribute(pt1: FcCoords, pt2: FcCoords, style: string): string {\n let dAddribute = `M ${pt1.x}, ${pt1.y} `;\n if (style === FlowchartConstants.curvedStyle) {\n const sourceTangent = this.computeEdgeSourceTangent(pt1, pt2);\n const destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2);\n dAddribute += `C ${sourceTangent.x}, ${sourceTangent.y} ${(destinationTangent.x - 50)}, ${destinationTangent.y} ${pt2.x}, ${pt2.y}`;\n } else {\n dAddribute += `L ${pt2.x}, ${pt2.y}`;\n }\n return dAddribute;\n }\n\n public getEdgeCenter(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: (pt1.x + pt2.x) / 2,\n y: (pt1.y + pt2.y) / 2\n };\n }\n\n private computeEdgeTangentOffset(pt1: FcCoords, pt2: FcCoords): number {\n return (pt2.y - pt1.y) / 2;\n }\n\n private computeEdgeSourceTangent(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: pt1.x,\n y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2)\n };\n }\n\n private computeEdgeDestinationTangent(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: pt2.x,\n y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2)\n };\n }\n\n}\n","import { FcModelService } from './model.service';\nimport { FcConnector, FcCoords, FcEdge, FcModel, FlowchartConstants, ModelvalidationError } from './ngx-flowchart.models';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { FcModelValidationService } from './modelvalidation.service';\n\nexport class FcEdgeDraggingService {\n\n edgeDragging: EdgeDragging = {\n isDragging: false,\n dragPoint1: null,\n dragPoint2: null,\n shadowDragStarted: false\n };\n\n private draggedEdgeSource: FcConnector = null;\n private dragOffset: FcCoords = {};\n private destinationHtmlElement: HTMLElement = null;\n private oldDisplayStyle = '';\n\n private readonly modelValidation: FcModelValidationService;\n private readonly edgeDrawingService: FcEdgeDrawingService;\n private readonly modelService: FcModelService;\n private readonly model: FcModel;\n private readonly isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n private readonly dragAnimation: string;\n private readonly edgeStyle: string;\n\n constructor(modelValidation: FcModelValidationService,\n edgeDrawingService: FcEdgeDrawingService,\n modelService: FcModelService,\n model: FcModel,\n isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean,\n applyFunction: (fn: (...args: any[]) => T) => T,\n dragAnimation: string,\n edgeStyle: string) {\n this.modelValidation = modelValidation;\n this.edgeDrawingService = edgeDrawingService;\n this.modelService = modelService;\n this.model = model;\n this.isValidEdgeCallback = isValidEdgeCallback || (() => true);\n this.applyFunction = applyFunction;\n this.dragAnimation = dragAnimation;\n this.edgeStyle = edgeStyle;\n }\n\n public dragstart(event: DragEvent, connector: FcConnector) {\n let swapConnector: FcConnector;\n let dragLabel: string;\n let prevEdge: FcEdge;\n if (connector.type === FlowchartConstants.leftConnectorType) {\n for (const edge of this.model.edges) {\n if (edge === connector.id) {\n swapConnector = this.modelService.connectors.getConnector(edge.source);\n dragLabel = edge.label;\n prevEdge = edge;\n this.applyFunction(() => {\n this.modelService.edges.delete(edge);\n });\n break;\n }\n }\n }\n this.edgeDragging.isDragging = true;\n if (swapConnector !== undefined) {\n this.draggedEdgeSource = swapConnector;\n this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id);\n this.edgeDragging.dragLabel = dragLabel;\n this.edgeDragging.prevEdge = prevEdge;\n } else {\n this.draggedEdgeSource = connector;\n this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id);\n }\n const canvas = this.modelService.canvasHtmlElement;\n if (!canvas) {\n throw new Error('No canvas while edgedraggingService found.');\n }\n this.dragOffset.x = -canvas.getBoundingClientRect().left;\n this.dragOffset.y = -canvas.getBoundingClientRect().top;\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n\n originalEvent.dataTransfer.setData('Text', 'Just to support firefox');\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n this.destinationHtmlElement = event.target as HTMLElement;\n this.oldDisplayStyle = this.destinationHtmlElement.style.display;\n this.destinationHtmlElement.style.display = 'none';\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.edgeDragging.shadowDragStarted = true;\n }\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.edgeDragging.gElement === undefined) {\n this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class'));\n this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path');\n this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle');\n }\n\n this.edgeDragging.gElement.css('display', 'block');\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n }\n event.stopPropagation();\n }\n\n public dragover(event: DragEvent) {\n if (this.edgeDragging.isDragging) {\n if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.destinationHtmlElement !== null) {\n this.destinationHtmlElement.style.display = this.oldDisplayStyle;\n }\n\n if (this.edgeDragging.shadowDragStarted) {\n this.applyFunction(() => {\n this.edgeDragging.shadowDragStarted = false;\n });\n }\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n return this.applyFunction(() => {\n if (this.destinationHtmlElement !== null) {\n this.destinationHtmlElement.style.display = this.oldDisplayStyle;\n }\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n });\n }\n }\n }\n\n public dragoverConnector(event: DragEvent, connector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n this.dragover(event);\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: connector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n }\n }\n\n public dragleaveMagnet(event: DragEvent) {\n this.edgeDragging.magnetActive = false;\n }\n\n public dragoverMagnet(event: DragEvent, connector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n this.dragover(event);\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: connector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) {\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n\n this.edgeDragging.magnetActive = true;\n\n this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id);\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n\n event.preventDefault();\n event.stopPropagation();\n return false;\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n return this.applyFunction(() => {\n this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id);\n event.preventDefault();\n event.stopPropagation();\n return false;\n });\n }\n }\n }\n }\n\n public dragend(event: DragEvent) {\n if (this.edgeDragging.isDragging) {\n this.edgeDragging.isDragging = false;\n this.edgeDragging.dragPoint1 = null;\n this.edgeDragging.dragPoint2 = null;\n this.edgeDragging.dragLabel = null;\n event.stopPropagation();\n\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.edgeDragging.gElement.css('display', 'none');\n }\n if (this.edgeDragging.prevEdge) {\n const edge = this.edgeDragging.prevEdge;\n this.edgeDragging.prevEdge = null;\n this.applyFunction(() => {\n this.modelService.edges.putEdge(edge);\n });\n }\n }\n }\n\n public drop(event: DragEvent, targetConnector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: targetConnector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n\n if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) {\n this.edgeDragging.prevEdge = null;\n this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel);\n event.stopPropagation();\n event.preventDefault();\n return false;\n }\n }\n }\n}\n\nexport interface EdgeDragging {\n isDragging: boolean;\n shadowDragStarted: boolean;\n dragPoint1: FcCoords;\n dragPoint2: FcCoords;\n dragLabel?: string;\n prevEdge?: FcEdge;\n magnetActive?: boolean;\n gElement?: JQuery;\n pathElement?: JQuery;\n circleElement?: JQuery;\n}\n","import { FcConnector, FcEdge, FcNode } from './ngx-flowchart.models';\n\nexport class FcMouseOverService {\n\n mouseoverscope: MouseOverScope = {\n connector: null,\n edge: null,\n node: null\n };\n\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(applyFunction: (fn: (...args: any[]) => T) => T) {\n this.applyFunction = applyFunction;\n }\n\n public nodeMouseOver(event: MouseEvent, node: FcNode) {\n return this.applyFunction(() => {\n this.mouseoverscope.node = node;\n });\n }\n\n public nodeMouseOut(event: MouseEvent, node: FcNode) {\n return this.applyFunction(() => {\n this.mouseoverscope.node = null;\n });\n }\n\n public connectorMouseEnter(event: MouseEvent, connector: FcConnector) {\n return this.applyFunction(() => {\n this.mouseoverscope.connector = connector;\n });\n }\n\n public connectorMouseLeave(event: MouseEvent, connector: FcConnector) {\n return this.applyFunction(() => {\n this.mouseoverscope.connector = null;\n });\n }\n\n public edgeMouseEnter(event: MouseEvent, edge: FcEdge) {\n this.mouseoverscope.edge = edge;\n }\n\n public edgeMouseLeave(event: MouseEvent, edge: FcEdge) {\n this.mouseoverscope.edge = null;\n }\n}\n\nexport interface MouseOverScope {\n connector: FcConnector;\n edge: FcEdge;\n node: FcNode;\n}\n","const regex = /(auto|scroll)/;\n\nconst style = (node: Element, prop: string): string =>\n getComputedStyle(node, null).getPropertyValue(prop);\n\nconst scroll = (node: Element) =>\n regex.test(\n style(node, 'overflow') +\n style(node, 'overflow-y') +\n style(node, 'overflow-x'));\n\nconst scrollparent = (node: HTMLElement): HTMLElement =>\n !node || node === document.body\n ? document.body\n : scroll(node)\n ? node\n : scrollparent(node.parentNode as HTMLElement);\n\nexport default scrollparent;\n","import { FcModelService } from './model.service';\nimport { FcRectBox } from 'ngx-flowchart-dev';\nimport scrollparent from './scrollparent';\n\ninterface Rectangle {\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n}\n\nexport class FcRectangleSelectService {\n\n private readonly selectRect: Rectangle = {\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 0\n };\n\n private readonly modelService: FcModelService;\n private readonly selectElement: HTMLElement;\n private readonly $canvasElement: JQuery;\n private readonly $scrollParent: JQuery;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(modelService: FcModelService,\n selectElement: HTMLElement,\n applyFunction: (fn: (...args: any[]) => T) => T) {\n this.modelService = modelService;\n this.selectElement = selectElement;\n this.$canvasElement = $(this.modelService.canvasHtmlElement);\n this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement));\n this.applyFunction = applyFunction;\n }\n\n public mousedown(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && this.selectElement.hidden) {\n this.selectElement.hidden = false;\n const offset = this.$canvasElement.offset();\n this.selectRect.x1 = Math.round(e.pageX - offset.left);\n this.selectRect.y1 = Math.round(e.pageY - offset.top);\n this.selectRect.x2 = this.selectRect.x1;\n this.selectRect.y2 = this.selectRect.y1;\n this.updateSelectRect();\n }\n }\n\n public mousemove(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && !this.selectElement.hidden) {\n const offset = this.$canvasElement.offset();\n this.selectRect.x2 = Math.round(e.pageX - offset.left);\n this.selectRect.y2 = Math.round(e.pageY - offset.top);\n this.updateScroll(offset);\n this.updateSelectRect();\n }\n }\n\n private updateScroll(offset: JQuery.Coordinates) {\n const rect = this.$scrollParent[0].getBoundingClientRect();\n const bottom = rect.bottom - offset.top;\n const right = rect.right - offset.left;\n const top = rect.top - offset.top;\n const left = rect.left - offset.left;\n if (this.selectRect.y2 - top < 25) {\n const topScroll = 25 - (this.selectRect.y2 - top);\n const scroll = this.$scrollParent.scrollTop();\n this.$scrollParent.scrollTop(scroll - topScroll);\n } else if (bottom - this.selectRect.y2 < 40) {\n const bottomScroll = 40 - (bottom - this.selectRect.y2);\n const scroll = this.$scrollParent.scrollTop();\n this.$scrollParent.scrollTop(scroll + bottomScroll);\n }\n if (this.selectRect.x2 - left < 25) {\n const leftScroll = 25 - (this.selectRect.x2 - left);\n const scroll = this.$scrollParent.scrollLeft();\n this.$scrollParent.scrollLeft(scroll - leftScroll);\n } else if (right - this.selectRect.x2 < 40) {\n const rightScroll = 40 - (right - this.selectRect.x2);\n const scroll = this.$scrollParent.scrollLeft();\n this.$scrollParent.scrollLeft(scroll + rightScroll);\n }\n }\n\n public mouseup(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && !this.selectElement.hidden) {\n const rectBox = this.selectElement.getBoundingClientRect() as FcRectBox;\n this.selectElement.hidden = true;\n this.selectObjects(rectBox);\n }\n }\n\n private updateSelectRect() {\n const x3 = Math.min(this.selectRect.x1, this.selectRect.x2);\n const x4 = Math.max(this.selectRect.x1, this.selectRect.x2);\n const y3 = Math.min(this.selectRect.y1, this.selectRect.y2);\n const y4 = Math.max(this.selectRect.y1, this.selectRect.y2);\n this.selectElement.style.left = x3 + 'px';\n this.selectElement.style.top = y3 + 'px';\n this.selectElement.style.width = x4 - x3 + 'px';\n this.selectElement.style.height = y4 - y3 + 'px';\n }\n\n private selectObjects(rectBox: FcRectBox) {\n this.applyFunction(() => {\n this.modelService.selectAllInRect(rectBox);\n });\n }\n\n}\n\n","import {\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnInit\n} from '@angular/core';\nimport { FcCallbacks, FcEdge, FcModel, FcNode, FlowchartConstants, UserCallbacks, UserNodeCallbacks } from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\nimport { FcModelValidationService } from './modelvalidation.service';\nimport { FcNodeDraggingService } from './node-dragging.service';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { FcEdgeDraggingService } from './edge-dragging.service';\nimport { FcMouseOverService } from './mouseover.service';\nimport { FcRectangleSelectService } from './rectangleselect.service';\n\n@Component({\n selector: 'fc-canvas',\n templateUrl: './ngx-flowchart.component.html',\n styleUrls: ['./ngx-flowchart.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgxFlowchartComponent implements OnInit, DoCheck {\n\n @HostBinding('attr.class')\n get canvasClass(): string {\n return FlowchartConstants.canvasClass;\n }\n\n @Input()\n model: FcModel;\n\n @Input()\n selectedObjects: any[];\n\n @Input()\n edgeStyle: string;\n\n @Input()\n userCallbacks: UserCallbacks;\n\n @Input()\n automaticResize: boolean;\n\n @Input()\n dragAnimation: string;\n\n @Input()\n nodeWidth: number;\n\n @Input()\n nodeHeight: number;\n\n @Input()\n dropTargetId: string;\n\n callbacks: FcCallbacks;\n\n userNodeCallbacks: UserNodeCallbacks;\n\n modelService: FcModelService;\n nodeDraggingService: FcNodeDraggingService;\n edgeDraggingService: FcEdgeDraggingService;\n mouseoverService: FcMouseOverService;\n rectangleSelectService: FcRectangleSelectService;\n\n arrowDefId: string;\n arrowDefIdSelected: string;\n\n flowchartConstants = FlowchartConstants;\n\n private nodesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => {\n return item;\n });\n\n private edgesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => {\n return item;\n });\n\n constructor(private elementRef: ElementRef,\n private differs: IterableDiffers,\n private modelValidation: FcModelValidationService,\n public edgeDrawingService: FcEdgeDrawingService,\n private cd: ChangeDetectorRef,\n private zone: NgZone) {\n this.arrowDefId = 'arrow-' + Math.random();\n this.arrowDefIdSelected = this.arrowDefId + '-selected';\n }\n\n ngOnInit() {\n if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) {\n throw new Error('edgeStyle not supported.');\n }\n this.nodeHeight = this.nodeHeight || 200;\n this.nodeWidth = this.nodeWidth || 200;\n this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint;\n this.userCallbacks = this.userCallbacks || {};\n this.automaticResize = this.automaticResize || false;\n\n for (const key of Object.keys(this.userCallbacks)) {\n const callback = this.userCallbacks[key];\n if (typeof callback !== 'function' && key !== 'nodeCallbacks') {\n throw new Error('All callbacks should be functions.');\n }\n }\n\n this.userNodeCallbacks = this.userCallbacks.nodeCallbacks;\n\n const element = $(this.elementRef.nativeElement);\n\n this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects,\n this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved,\n this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg'));\n\n if (this.dropTargetId) {\n this.modelService.dropTargetId = this.dropTargetId;\n }\n\n const applyFunction = this.zone.run.bind(this.zone);\n\n this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction,\n this.automaticResize, this.dragAnimation);\n\n this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService,\n this.model, this.userCallbacks.isValidEdge || null, applyFunction,\n this.dragAnimation, this.edgeStyle);\n\n this.mouseoverService = new FcMouseOverService(applyFunction);\n\n this.rectangleSelectService = new FcRectangleSelectService(this.modelService,\n element[0].querySelector('#select-rectangle'), applyFunction);\n\n this.callbacks = {\n nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService),\n nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService),\n edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService),\n edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService),\n edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService),\n edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService),\n edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService),\n edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService),\n nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService),\n nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService),\n connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService),\n connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService),\n nodeClicked: (event, node) => {\n this.modelService.nodes.handleClicked(node, event.ctrlKey);\n event.stopPropagation();\n event.preventDefault();\n }\n };\n this.adjustCanvasSize(true);\n }\n\n ngDoCheck(): void {\n if (this.model) {\n const nodesChange = this.nodesDiffer.diff(this.model.nodes);\n const edgesChange = this.edgesDiffer.diff(this.model.edges);\n let nodesChanged = false;\n let edgesChanged = false;\n if (nodesChange !== null) {\n nodesChange.forEachAddedItem(() => {\n nodesChanged = true;\n });\n nodesChange.forEachRemovedItem(() => {\n nodesChanged = true;\n });\n }\n if (edgesChange !== null) {\n edgesChange.forEachAddedItem(() => {\n edgesChanged = true;\n });\n edgesChange.forEachRemovedItem(() => {\n edgesChanged = true;\n });\n }\n if (nodesChanged) {\n this.adjustCanvasSize(true);\n }\n if (nodesChanged || edgesChanged) {\n this.cd.detectChanges();\n }\n }\n }\n\n getEdgeDAttribute(edge: FcEdge): string {\n return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge),\n this.modelService.edges.destCoord(edge), this.edgeStyle);\n }\n\n public adjustCanvasSize(fit?: boolean) {\n let maxX = 0;\n let maxY = 0;\n const element = $(this.elementRef.nativeElement);\n this.model.nodes.forEach((node) => {\n maxX = Math.max(node.x + this.nodeWidth, maxX);\n maxY = Math.max(node.y + this.nodeHeight, maxY);\n });\n let width;\n let height;\n if (fit) {\n width = maxX;\n height = maxY;\n } else {\n width = Math.max(maxX, element.prop('offsetWidth'));\n height = Math.max(maxY, element.prop('offsetHeight'));\n }\n element.css('width', width + 'px');\n element.css('height', height + 'px');\n }\n\n canvasClick(event: MouseEvent) {}\n\n edgeMouseDown(event: MouseEvent, edge: FcEdge) {\n event.stopPropagation();\n }\n\n edgeClick(event: MouseEvent, edge: FcEdge) {\n this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey);\n event.stopPropagation();\n event.preventDefault();\n }\n\n edgeRemove(event: Event, edge: FcEdge) {\n this.modelService.edges.delete(edge);\n event.stopPropagation();\n event.preventDefault();\n }\n\n edgeEdit(event: Event, edge: FcEdge) {\n if (this.userCallbacks.edgeEdit) {\n this.userCallbacks.edgeEdit(event, edge);\n }\n }\n\n edgeDoubleClick(event: MouseEvent, edge: FcEdge) {\n if (this.userCallbacks.edgeDoubleClick) {\n this.userCallbacks.edgeDoubleClick(event, edge);\n }\n }\n\n edgeMouseOver(event: MouseEvent, edge: FcEdge) {\n if (this.userCallbacks.edgeMouseOver) {\n this.userCallbacks.edgeMouseOver(event, edge);\n }\n }\n\n edgeMouseEnter(event: MouseEvent, edge: FcEdge) {\n this.mouseoverService.edgeMouseEnter(event, edge);\n }\n\n edgeMouseLeave(event: MouseEvent, edge: FcEdge) {\n this.mouseoverService.edgeMouseLeave(event, edge);\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n this.nodeDraggingService.dragover(event);\n this.edgeDraggingService.dragover(event);\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n if (event.preventDefault) {\n event.preventDefault();\n }\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n this.nodeDraggingService.drop(event);\n }\n\n @HostListener('mousedown', ['$event'])\n mousedown(event: MouseEvent) {\n this.rectangleSelectService.mousedown(event);\n }\n\n @HostListener('mousemove', ['$event'])\n mousemove(event: MouseEvent) {\n this.rectangleSelectService.mousemove(event);\n }\n\n @HostListener('mouseup', ['$event'])\n mouseup(event: MouseEvent) {\n this.rectangleSelectService.mouseup(event);\n }\n\n}\n","import { Directive, ElementRef, HostListener, Input, OnInit } from '@angular/core';\nimport { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[fc-magnet]'\n})\nexport class FcMagnetDirective implements OnInit {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n connector: FcConnector;\n\n constructor(public elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.magnetClass);\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n return this.callbacks.edgeDragoverMagnet(event, this.connector);\n }\n\n @HostListener('dragleave', ['$event'])\n dragleave(event: DragEvent) {\n this.callbacks.edgeDragleaveMagnet(event);\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n return this.callbacks.edgeDrop(event, this.connector);\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n this.callbacks.edgeDragend(event);\n }\n\n}\n","import { Directive, ElementRef, HostListener, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[fc-connector]'\n})\nexport class FcConnectorDirective implements OnInit, OnChanges {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n connector: FcConnector;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n constructor(public elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.connectorClass);\n if (this.modelservice.isEditable()) {\n element.attr('draggable', 'true');\n this.updateConnectorClass();\n }\n this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n let updateConnector = false;\n for (const propName of Object.keys(changes)) {\n const change = changes[propName];\n if (!change.firstChange && change.currentValue !== change.previousValue) {\n if (propName === 'mouseOverConnector') {\n updateConnector = true;\n }\n }\n }\n if (updateConnector && this.modelservice.isEditable()) {\n this.updateConnectorClass();\n }\n }\n\n private updateConnectorClass() {\n const element = $(this.elementRef.nativeElement);\n if (this.connector === this.mouseOverConnector) {\n element.addClass(FlowchartConstants.hoverClass);\n } else {\n element.removeClass(FlowchartConstants.hoverClass);\n }\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n // Skip - conflict with magnet\n /* if (this.modelservice.isEditable()) {\n return this.callbacks.edgeDragoverConnector(event, this.connector);\n }*/\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n return this.callbacks.edgeDrop(event, this.connector);\n }\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.edgeDragend(event);\n }\n }\n\n @HostListener('dragstart', ['$event'])\n dragstart(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.edgeDragstart(event, this.connector);\n }\n }\n\n @HostListener('mouseenter', ['$event'])\n mouseenter(event: MouseEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.connectorMouseEnter(event, this.connector);\n }\n }\n\n @HostListener('mouseleave', ['$event'])\n mouseleave(event: MouseEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.connectorMouseLeave(event, this.connector);\n }\n }\n\n}\n","import {\n Component,\n ComponentFactoryResolver, Directive,\n ElementRef, HostBinding,\n HostListener,\n Inject,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport {\n FC_NODE_COMPONENT_CONFIG,\n FcCallbacks,\n FcConnector,\n FcNode,\n FcNodeComponentConfig,\n FlowchartConstants,\n UserNodeCallbacks\n} from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\n\n@Component({\n selector: 'fc-node',\n template: '',\n styleUrls: ['./node.component.scss']\n})\nexport class FcNodeContainerComponent implements OnInit, OnChanges {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n userNodeCallbacks: UserNodeCallbacks;\n\n @Input()\n node: FcNode;\n\n @Input()\n selected: boolean;\n\n @Input()\n edit: boolean;\n\n @Input()\n underMouse: boolean;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n dragging: boolean;\n\n @HostBinding('attr.id')\n get nodeId(): string {\n return this.node.id;\n }\n\n @HostBinding('style.top')\n get top(): string {\n return this.node.y + 'px';\n }\n\n @HostBinding('style.left')\n get left(): string {\n return this.node.x + 'px';\n }\n\n nodeComponent: FcNodeComponent;\n\n @ViewChild('nodeContent', {read: ViewContainerRef, static: true}) nodeContentContainer: ViewContainerRef;\n\n constructor(@Inject(FC_NODE_COMPONENT_CONFIG) private nodeComponentConfig: FcNodeComponentConfig,\n private elementRef: ElementRef,\n private componentFactoryResolver: ComponentFactoryResolver) {\n }\n\n ngOnInit(): void {\n if (!this.userNodeCallbacks) {\n this.userNodeCallbacks = {};\n }\n this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || (() => {});\n this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || (() => {});\n this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || (() => {});\n this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || (() => {});\n this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || (() => {});\n\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.nodeClass);\n if (!this.node.readonly) {\n element.attr('draggable', 'true');\n }\n this.updateNodeClass();\n this.modelservice.nodes.setHtmlElement(this.node.id, element[0]);\n this.nodeContentContainer.clear();\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType);\n const componentRef = this.nodeContentContainer.createComponent(componentFactory);\n this.nodeComponent = componentRef.instance;\n this.nodeComponent.callbacks = this.callbacks;\n this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks;\n this.nodeComponent.node = this.node;\n this.nodeComponent.modelservice = this.modelservice;\n this.updateNodeComponent();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n let updateNode = false;\n for (const propName of Object.keys(changes)) {\n const change = changes[propName];\n if (!change.firstChange && change.currentValue !== change.previousValue) {\n if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) {\n updateNode = true;\n }\n }\n }\n if (updateNode) {\n this.updateNodeClass();\n this.updateNodeComponent();\n }\n }\n\n private updateNodeClass() {\n const element = $(this.elementRef.nativeElement);\n this.toggleClass(element, FlowchartConstants.selectedClass, this.selected);\n this.toggleClass(element, FlowchartConstants.editClass, this.edit);\n this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse);\n this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging);\n }\n\n private updateNodeComponent() {\n this.nodeComponent.selected = this.selected;\n this.nodeComponent.edit = this.edit;\n this.nodeComponent.underMouse = this.underMouse;\n this.nodeComponent.mouseOverConnector = this.mouseOverConnector;\n this.nodeComponent.dragging = this.dragging;\n }\n\n private toggleClass(element: JQuery, clazz: string, set: boolean) {\n if (set) {\n element.addClass(clazz);\n } else {\n element.removeClass(clazz);\n }\n }\n\n @HostListener('mousedown', ['$event'])\n mousedown(event: MouseEvent) {\n event.stopPropagation();\n }\n\n @HostListener('dragstart', ['$event'])\n dragstart(event: DragEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeDragstart(event, this.node);\n }\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeDragend(event);\n }\n }\n\n @HostListener('click', ['$event'])\n click(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeClicked(event, this.node);\n }\n }\n\n @HostListener('mouseover', ['$event'])\n mouseover(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeMouseOver(event, this.node);\n }\n }\n\n @HostListener('mouseout', ['$event'])\n mouseout(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeMouseOut(event, this.node);\n }\n }\n\n}\n\nexport abstract class FcNodeComponent implements OnInit {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n userNodeCallbacks: UserNodeCallbacks;\n\n @Input()\n node: FcNode;\n\n @Input()\n selected: boolean;\n\n @Input()\n edit: boolean;\n\n @Input()\n underMouse: boolean;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n dragging: boolean;\n\n flowchartConstants = FlowchartConstants;\n\n ngOnInit(): void {\n }\n\n}\n","import { Component } from '@angular/core';\nimport { FcNodeComponent } from './node.component';\n\n@Component({\n selector: 'fc-default-node',\n templateUrl: './default-node.component.html',\n styleUrls: ['./default-node.component.scss']\n})\nexport class DefaultFcNodeComponent extends FcNodeComponent {\n\n constructor() {\n super();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { NgxFlowchartComponent } from './ngx-flowchart.component';\nimport { FcModelValidationService } from './modelvalidation.service';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { CommonModule } from '@angular/common';\nimport { FcMagnetDirective } from './magnet.directive';\nimport { FcConnectorDirective } from './connector.directive';\nimport { FcNodeContainerComponent } from './node.component';\nimport { FC_NODE_COMPONENT_CONFIG } from './ngx-flowchart.models';\nimport { DefaultFcNodeComponent } from './default-node.component';\n\n@NgModule({\n entryComponents: [\n DefaultFcNodeComponent\n ],\n declarations: [NgxFlowchartComponent,\n FcMagnetDirective,\n FcConnectorDirective,\n FcNodeContainerComponent,\n DefaultFcNodeComponent],\n providers: [\n FcModelValidationService,\n FcEdgeDrawingService,\n {\n provide: FC_NODE_COMPONENT_CONFIG,\n useValue: {\n nodeComponentType: DefaultFcNodeComponent\n }\n }\n ],\n imports: [\n CommonModule\n ],\n exports: [NgxFlowchartComponent,\n FcMagnetDirective,\n FcConnectorDirective,\n DefaultFcNodeComponent]\n})\nexport class NgxFlowchartModule { }\n"]} \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/connector.directive.js b/dist/ngx-flowchart/esm2015/lib/connector.directive.js new file mode 100644 index 0000000..8ce831e --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/connector.directive.js @@ -0,0 +1,152 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { Directive, ElementRef, HostListener, Input } from '@angular/core'; +import { FlowchartConstants } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +export class FcConnectorDirective { + /** + * @param {?} elementRef + */ + constructor(elementRef) { + this.elementRef = elementRef; + } + /** + * @return {?} + */ + ngOnInit() { + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.connectorClass); + if (this.modelservice.isEditable()) { + element.attr('draggable', 'true'); + this.updateConnectorClass(); + } + this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]); + } + /** + * @param {?} changes + * @return {?} + */ + ngOnChanges(changes) { + /** @type {?} */ + let updateConnector = false; + for (const propName of Object.keys(changes)) { + /** @type {?} */ + const change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (propName === 'mouseOverConnector') { + updateConnector = true; + } + } + } + if (updateConnector && this.modelservice.isEditable()) { + this.updateConnectorClass(); + } + } + /** + * @private + * @return {?} + */ + updateConnectorClass() { + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + if (this.connector === this.mouseOverConnector) { + element.addClass(FlowchartConstants.hoverClass); + } + else { + element.removeClass(FlowchartConstants.hoverClass); + } + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + // Skip - conflict with magnet + /* if (this.modelservice.isEditable()) { + return this.callbacks.edgeDragoverConnector(event, this.connector); + }*/ + } + /** + * @param {?} event + * @return {?} + */ + drop(event) { + if (this.modelservice.isEditable()) { + return this.callbacks.edgeDrop(event, this.connector); + } + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragend(event); + } + } + /** + * @param {?} event + * @return {?} + */ + dragstart(event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragstart(event, this.connector); + } + } + /** + * @param {?} event + * @return {?} + */ + mouseenter(event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseEnter(event, this.connector); + } + } + /** + * @param {?} event + * @return {?} + */ + mouseleave(event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseLeave(event, this.connector); + } + } +} +FcConnectorDirective.decorators = [ + { type: Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-connector]' + },] } +]; +/** @nocollapse */ +FcConnectorDirective.ctorParameters = () => [ + { type: ElementRef } +]; +FcConnectorDirective.propDecorators = { + callbacks: [{ type: Input }], + modelservice: [{ type: Input }], + connector: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }], + dragstart: [{ type: HostListener, args: ['dragstart', ['$event'],] }], + mouseenter: [{ type: HostListener, args: ['mouseenter', ['$event'],] }], + mouseleave: [{ type: HostListener, args: ['mouseleave', ['$event'],] }] +}; +if (false) { + /** @type {?} */ + FcConnectorDirective.prototype.callbacks; + /** @type {?} */ + FcConnectorDirective.prototype.modelservice; + /** @type {?} */ + FcConnectorDirective.prototype.connector; + /** @type {?} */ + FcConnectorDirective.prototype.mouseOverConnector; + /** @type {?} */ + FcConnectorDirective.prototype.elementRef; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29ubmVjdG9yLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJsaWIvY29ubmVjdG9yLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBb0MsTUFBTSxlQUFlLENBQUM7QUFDN0csT0FBTyxFQUE0QixrQkFBa0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3RGLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQU1qRCxNQUFNLE9BQU8sb0JBQW9COzs7O0lBYy9CLFlBQW1CLFVBQW1DO1FBQW5DLGVBQVUsR0FBVixVQUFVLENBQXlCO0lBQ3RELENBQUM7Ozs7SUFFRCxRQUFROztjQUNBLE9BQU8sR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxhQUFhLENBQUM7UUFDaEQsT0FBTyxDQUFDLFFBQVEsQ0FBQyxrQkFBa0IsQ0FBQyxjQUFjLENBQUMsQ0FBQztRQUNwRCxJQUFJLElBQUksQ0FBQyxZQUFZLENBQUMsVUFBVSxFQUFFLEVBQUU7WUFDbEMsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsTUFBTSxDQUFDLENBQUM7WUFDbEMs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odGhpcy5tb2RlbHNlcnZpY2UuaXNFZGl0YWJsZSgpKSB7XG4gICAgICB0aGlzLmNhbGxiYWNrcy5jb25uZWN0b3JNb3VzZUVudGVyKGV2ZW50LCB0aGlzLmNvbm5lY3Rvcik7XG4gICAgfVxuICB9XG5cbiAgQEhvc3RMaXN0ZW5lcignbW91c2VsZWF2ZScsIFsnJGV2ZW50J10pXG4gIG1vdXNlbGVhdmUoZXZlbnQ6IE1vdXNlRXZlbnQpIHtcbiAgICBpZiAodGhpcy5tb2RlbHNlcnZpY2UuaXNFZGl0YWJsZSgpKSB7XG4gICAgICB0aGlzLmNhbGxiYWNrcy5jb25uZWN0b3JNb3VzZUxlYXZlKGV2ZW50LCB0aGlzLmNvbm5lY3Rvcik7XG4gICAgfVxuICB9XG5cbn1cbiJdfQ== \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/default-node.component.js b/dist/ngx-flowchart/esm2015/lib/default-node.component.js new file mode 100644 index 0000000..f20ee9f --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/default-node.component.js @@ -0,0 +1,21 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { Component } from '@angular/core'; +import { FcNodeComponent } from './node.component'; +export class DefaultFcNodeComponent extends FcNodeComponent { + constructor() { + super(); + } +} +DefaultFcNodeComponent.decorators = [ + { type: Component, args: [{ + selector: 'fc-default-node', + template: "\n
\n
\n

{{ node.name }}

\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n ×\n
\n\n", + styles: [":host .fc-node-overlay{position:absolute;pointer-events:none;left:0;top:0;right:0;bottom:0;background-color:#000;opacity:0}:host :host-context(.fc-hover) .fc-node-overlay{opacity:.25;transition:opacity .2s}:host :host-context(.fc-selected) .fc-node-overlay{opacity:.25}:host .innerNode{display:flex;justify-content:center;align-items:center;min-width:100px;border-radius:5px;background-color:#f15b26;color:#fff;font-size:16px;pointer-events:none}:host .innerNode p{padding:0 15px;text-align:center}"] + }] } +]; +/** @nocollapse */ +DefaultFcNodeComponent.ctorParameters = () => []; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdC1ub2RlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJsaWIvZGVmYXVsdC1ub2RlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFPbkQsTUFBTSxPQUFPLHNCQUF1QixTQUFRLGVBQWU7SUFFekQ7UUFDRSxLQUFLLEVBQUUsQ0FBQztJQUNWLENBQUM7OztZQVRGLFNBQVMsU0FBQztnQkFDVCxRQUFRLEVBQUUsaUJBQWlCO2dCQUMzQiw4aERBQTRDOzthQUU3QyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgRmNOb2RlQ29tcG9uZW50IH0gZnJvbSAnLi9ub2RlLmNvbXBvbmVudCc7XG5cbkBDb21wb25lbnQoe1xuICBzZWxlY3RvcjogJ2ZjLWRlZmF1bHQtbm9kZScsXG4gIHRlbXBsYXRlVXJsOiAnLi9kZWZhdWx0LW5vZGUuY29tcG9uZW50Lmh0bWwnLFxuICBzdHlsZVVybHM6IFsnLi9kZWZhdWx0LW5vZGUuY29tcG9uZW50LnNjc3MnXVxufSlcbmV4cG9ydCBjbGFzcyBEZWZhdWx0RmNOb2RlQ29tcG9uZW50IGV4dGVuZHMgRmNOb2RlQ29tcG9uZW50IHtcblxuICBjb25zdHJ1Y3RvcigpIHtcbiAgICBzdXBlcigpO1xuICB9XG5cbn1cbiJdfQ== \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/edge-dragging.service.js b/dist/ngx-flowchart/esm2015/lib/edge-dragging.service.js new file mode 100644 index 0000000..6c80343 --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/edge-dragging.service.js @@ -0,0 +1,390 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { FlowchartConstants, ModelvalidationError } from './ngx-flowchart.models'; +export class FcEdgeDraggingService { + /** + * @param {?} modelValidation + * @param {?} edgeDrawingService + * @param {?} modelService + * @param {?} model + * @param {?} isValidEdgeCallback + * @param {?} applyFunction + * @param {?} dragAnimation + * @param {?} edgeStyle + */ + constructor(modelValidation, edgeDrawingService, modelService, model, isValidEdgeCallback, applyFunction, dragAnimation, edgeStyle) { + this.edgeDragging = { + isDragging: false, + dragPoint1: null, + dragPoint2: null, + shadowDragStarted: false + }; + this.draggedEdgeSource = null; + this.dragOffset = {}; + this.destinationHtmlElement = null; + this.oldDisplayStyle = ''; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.modelService = modelService; + this.model = model; + this.isValidEdgeCallback = isValidEdgeCallback || ((/** + * @return {?} + */ + () => true)); + this.applyFunction = applyFunction; + this.dragAnimation = dragAnimation; + this.edgeStyle = edgeStyle; + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + dragstart(event, connector) { + /** @type {?} */ + let swapConnector; + /** @type {?} */ + let dragLabel; + /** @type {?} */ + let prevEdge; + if (connector.type === FlowchartConstants.leftConnectorType) { + for (const edge of this.model.edges) { + if (edge === connector.id) { + swapConnector = this.modelService.connectors.getConnector(edge.source); + dragLabel = edge.label; + prevEdge = edge; + this.applyFunction((/** + * @return {?} + */ + () => { + this.modelService.edges.delete(edge); + })); + break; + } + } + } + this.edgeDragging.isDragging = true; + if (swapConnector !== undefined) { + this.draggedEdgeSource = swapConnector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id); + this.edgeDragging.dragLabel = dragLabel; + this.edgeDragging.prevEdge = prevEdge; + } + else { + this.draggedEdgeSource = connector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id); + } + /** @type {?} */ + const canvas = this.modelService.canvasHtmlElement; + if (!canvas) { + throw new Error('No canvas while edgedraggingService found.'); + } + this.dragOffset.x = -canvas.getBoundingClientRect().left; + this.dragOffset.y = -canvas.getBoundingClientRect().top; + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + /** @type {?} */ + const originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + originalEvent.dataTransfer.setData('Text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + this.destinationHtmlElement = (/** @type {?} */ (event.target)); + this.oldDisplayStyle = this.destinationHtmlElement.style.display; + this.destinationHtmlElement.style.display = 'none'; + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.shadowDragStarted = true; + } + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.edgeDragging.gElement === undefined) { + this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class')); + this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path'); + this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle'); + } + this.edgeDragging.gElement.css('display', 'block'); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + event.stopPropagation(); + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + if (this.edgeDragging.isDragging) { + if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.destinationHtmlElement !== null) { + this.destinationHtmlElement.style.display = this.oldDisplayStyle; + } + if (this.edgeDragging.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + () => { + this.edgeDragging.shadowDragStarted = false; + })); + } + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + () => { + if (this.destinationHtmlElement !== null) { + this.destinationHtmlElement.style.display = this.oldDisplayStyle; + } + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + })); + } + } + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + dragoverConnector(event, connector) { + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + event.preventDefault(); + event.stopPropagation(); + return false; + } + } + } + /** + * @param {?} event + * @return {?} + */ + dragleaveMagnet(event) { + this.edgeDragging.magnetActive = false; + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + dragoverMagnet(event, connector) { + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.magnetActive = true; + this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + event.preventDefault(); + event.stopPropagation(); + return false; + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id); + event.preventDefault(); + event.stopPropagation(); + return false; + })); + } + } + } + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + if (this.edgeDragging.isDragging) { + this.edgeDragging.isDragging = false; + this.edgeDragging.dragPoint1 = null; + this.edgeDragging.dragPoint2 = null; + this.edgeDragging.dragLabel = null; + event.stopPropagation(); + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.gElement.css('display', 'none'); + } + if (this.edgeDragging.prevEdge) { + /** @type {?} */ + const edge = this.edgeDragging.prevEdge; + this.edgeDragging.prevEdge = null; + this.applyFunction((/** + * @return {?} + */ + () => { + this.modelService.edges.putEdge(edge); + })); + } + } + } + /** + * @param {?} event + * @param {?} targetConnector + * @return {?} + */ + drop(event, targetConnector) { + if (this.edgeDragging.isDragging) { + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: targetConnector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) { + this.edgeDragging.prevEdge = null; + this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel); + event.stopPropagation(); + event.preventDefault(); + return false; + } + } + } +} +if (false) { + /** @type {?} */ + FcEdgeDraggingService.prototype.edgeDragging; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.draggedEdgeSource; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragOffset; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.destinationHtmlElement; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.oldDisplayStyle; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelValidation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.model; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.isValidEdgeCallback; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.applyFunction; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeStyle; +} +/** + * @record + */ +export function EdgeDragging() { } +if (false) { + /** @type {?} */ + EdgeDragging.prototype.isDragging; + /** @type {?} */ + EdgeDragging.prototype.shadowDragStarted; + /** @type {?} */ + EdgeDragging.prototype.dragPoint1; + /** @type {?} */ + EdgeDragging.prototype.dragPoint2; + /** @type {?|undefined} */ + EdgeDragging.prototype.dragLabel; + /** @type {?|undefined} */ + EdgeDragging.prototype.prevEdge; + /** @type {?|undefined} */ + EdgeDragging.prototype.magnetActive; + /** @type {?|undefined} */ + EdgeDragging.prototype.gElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.pathElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.circleElement; +} +//# sourceMappingURL=data:application/json;base64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cbiAgZHJhZ1BvaW50MTogRmNDb29yZHM7XG4gIGRyYWdQb2ludDI6IEZjQ29vcmRzO1xuICBkcmFnTGFiZWw/OiBzdHJpbmc7XG4gIHByZXZFZGdlPzogRmNFZGdlO1xuICBtYWduZXRBY3RpdmU/OiBib29sZWFuO1xuICBnRWxlbWVudD86IEpRdWVyeTxFbGVtZW50PjtcbiAgcGF0aEVsZW1lbnQ/OiBKUXVlcnk8RWxlbWVudD47XG4gIGNpcmNsZUVsZW1lbnQ/OiBKUXVlcnk8RWxlbWVudD47XG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/edge-drawing.service.js b/dist/ngx-flowchart/esm2015/lib/edge-drawing.service.js new file mode 100644 index 0000000..01772c0 --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/edge-drawing.service.js @@ -0,0 +1,81 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { Injectable } from '@angular/core'; +import { FlowchartConstants } from './ngx-flowchart.models'; +export class FcEdgeDrawingService { + constructor() { + } + /** + * @param {?} pt1 + * @param {?} pt2 + * @param {?} style + * @return {?} + */ + getEdgeDAttribute(pt1, pt2, style) { + /** @type {?} */ + let dAddribute = `M ${pt1.x}, ${pt1.y} `; + if (style === FlowchartConstants.curvedStyle) { + /** @type {?} */ + const sourceTangent = this.computeEdgeSourceTangent(pt1, pt2); + /** @type {?} */ + const destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2); + dAddribute += `C ${sourceTangent.x}, ${sourceTangent.y} ${(destinationTangent.x - 50)}, ${destinationTangent.y} ${pt2.x}, ${pt2.y}`; + } + else { + dAddribute += `L ${pt2.x}, ${pt2.y}`; + } + return dAddribute; + } + /** + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + getEdgeCenter(pt1, pt2) { + return { + x: (pt1.x + pt2.x) / 2, + y: (pt1.y + pt2.y) / 2 + }; + } + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + computeEdgeTangentOffset(pt1, pt2) { + return (pt2.y - pt1.y) / 2; + } + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + computeEdgeSourceTangent(pt1, pt2) { + return { + x: pt1.x, + y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2) + }; + } + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + computeEdgeDestinationTangent(pt1, pt2) { + return { + x: pt2.x, + y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2) + }; + } +} +FcEdgeDrawingService.decorators = [ + { type: Injectable } +]; +/** @nocollapse */ +FcEdgeDrawingService.ctorParameters = () => []; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRnZS1kcmF3aW5nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL2VkZ2UtZHJhd2luZy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBWSxrQkFBa0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBR3RFLE1BQU0sT0FBTyxvQkFBb0I7SUFFL0I7SUFDQSxDQUFDOzs7Ozs7O0lBRU0saUJBQWlCLENBQUMsR0FBYSxFQUFFLEdBQWEsRUFBRSxLQUFhOztZQUM5RCxVQUFVLEdBQUcsS0FBSyxHQUFHLENBQUMsQ0FBQyxLQUFLLEdBQUcsQ0FBQyxDQUFDLEdBQUc7UUFDeEMsSUFBSSxLQUFLLEtBQUssa0JBQWtCLENBQUMsV0FBVyxFQUFFOztrQkFDdEMsYUFBYSxHQUFHLElBQUksQ0FBQyx3QkFBd0IsQ0FBQyxHQUFHLEVBQUU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ICAgICB4OiBwdDIueCxcbiAgICAgIHk6IHB0Mi55IC0gdGhpcy5jb21wdXRlRWRnZVRhbmdlbnRPZmZzZXQocHQxLCBwdDIpXG4gICAgfTtcbiAgfVxuXG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/magnet.directive.js b/dist/ngx-flowchart/esm2015/lib/magnet.directive.js new file mode 100644 index 0000000..bdf0f51 --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/magnet.directive.js @@ -0,0 +1,77 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { Directive, ElementRef, HostListener, Input } from '@angular/core'; +import { FlowchartConstants } from './ngx-flowchart.models'; +export class FcMagnetDirective { + /** + * @param {?} elementRef + */ + constructor(elementRef) { + this.elementRef = elementRef; + } + /** + * @return {?} + */ + ngOnInit() { + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.magnetClass); + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + return this.callbacks.edgeDragoverMagnet(event, this.connector); + } + /** + * @param {?} event + * @return {?} + */ + dragleave(event) { + this.callbacks.edgeDragleaveMagnet(event); + } + /** + * @param {?} event + * @return {?} + */ + drop(event) { + return this.callbacks.edgeDrop(event, this.connector); + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + this.callbacks.edgeDragend(event); + } +} +FcMagnetDirective.decorators = [ + { type: Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-magnet]' + },] } +]; +/** @nocollapse */ +FcMagnetDirective.ctorParameters = () => [ + { type: ElementRef } +]; +FcMagnetDirective.propDecorators = { + callbacks: [{ type: Input }], + connector: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + dragleave: [{ type: HostListener, args: ['dragleave', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }] +}; +if (false) { + /** @type {?} */ + FcMagnetDirective.prototype.callbacks; + /** @type {?} */ + FcMagnetDirective.prototype.connector; + /** @type {?} */ + FcMagnetDirective.prototype.elementRef; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnbmV0LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJsaWIvbWFnbmV0LmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUNuRixPQUFPLEVBQTRCLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFNdEYsTUFBTSxPQUFPLGlCQUFpQjs7OztJQVE1QixZQUFtQixVQUFtQztRQUFuQyxlQUFVLEdBQVYsVUFBVSxDQUF5QjtJQUN0RCxDQUFDOzs7O0lBRUQsUUFBUTs7Y0FDQSxPQUFPLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsYUFBYSxDQUFDO1FBQ2hELE9BQU8sQ0FBQyxRQUFRLENBQUMsa0JBQWtCLENBQUMsV0FBVyxDQUFDLENBQUM7SUFDbkQsQ0FBQzs7Ozs7SUFHRCxRQUFRLENBQUMsS0FBZ0I7UUFDdkIsT0FBTyxJQUFJLENBQUMsU0FBUyxDQUFDLGtCQUFrQixDQUFDLEtBQUssRUFBRSxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUM7SUFDbEUsQ0FBQzs7Ozs7SUFHRCxTQUFTLENBQUMsS0FBZ0I7UUFDeEIsSUFBSSxDQUFDLFNBQVMsQ0FBQyxtQkFBbUIsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUM1QyxDQUFDOzs7OztJQ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W5kKGV2ZW50OiBEcmFnRXZlbnQpIHtcbiAgICB0aGlzLmNhbGxiYWNrcy5lZGdlRHJhZ2VuZChldmVudCk7XG4gIH1cblxufVxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/model.service.js b/dist/ngx-flowchart/esm2015/lib/model.service.js new file mode 100644 index 0000000..d6768ec --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/model.service.js @@ -0,0 +1,778 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { of } from 'rxjs'; +export class FcModelService { + /** + * @param {?} modelValidation + * @param {?} model + * @param {?} cd + * @param {?} selectedObjects + * @param {?} dropNode + * @param {?} createEdge + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @param {?} canvasHtmlElement + * @param {?} svgHtmlElement + */ + constructor(modelValidation, model, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) { + this.connectorsHtmlElements = {}; + this.nodesHtmlElements = {}; + this.canvasHtmlElement = null; + this.dragImage = null; + this.svgHtmlElement = null; + this.modelValidation = modelValidation; + this.model = model; + this.cd = cd; + this.canvasHtmlElement = canvasHtmlElement; + this.svgHtmlElement = svgHtmlElement; + this.modelValidation.validateModel(this.model); + this.selectedObjects = selectedObjects; + this.dropNode = dropNode || ((/** + * @return {?} + */ + () => { })); + this.createEdge = createEdge || ((/** + * @return {?} + */ + () => of({ label: 'label' }))); + this.edgeAddedCallback = edgeAddedCallback || ((/** + * @return {?} + */ + () => { })); + this.nodeRemovedCallback = nodeRemovedCallback || ((/** + * @return {?} + */ + () => { })); + this.edgeRemovedCallback = edgeRemovedCallback || ((/** + * @return {?} + */ + () => { })); + this.connectors = new ConnectorsModel(this); + this.nodes = new NodesModel(this); + this.edges = new EdgesModel(this); + } + /** + * @return {?} + */ + detectChanges() { + setTimeout((/** + * @return {?} + */ + () => { + this.cd.detectChanges(); + }), 0); + } + /** + * @param {?} object + * @return {?} + */ + selectObject(object) { + if (this.isEditable()) { + if (this.selectedObjects.indexOf(object) === -1) { + this.selectedObjects.push(object); + } + } + } + /** + * @param {?} object + * @return {?} + */ + deselectObject(object) { + if (this.isEditable()) { + /** @type {?} */ + const index = this.selectedObjects.indexOf(object); + if (index === -1) { + throw new Error('Tried to deselect an unselected object'); + } + this.selectedObjects.splice(index, 1); + } + } + /** + * @param {?} object + * @return {?} + */ + toggleSelectedObject(object) { + if (this.isSelectedObject(object)) { + this.deselectObject(object); + } + else { + this.selectObject(object); + } + } + /** + * @param {?} object + * @return {?} + */ + isSelectedObject(object) { + return this.selectedObjects.indexOf(object) !== -1; + } + /** + * @return {?} + */ + selectAll() { + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + node => { + if (!node.readonly) { + this.nodes.select(node); + } + })); + this.model.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + edge => { + this.edges.select(edge); + })); + this.detectChanges(); + } + /** + * @return {?} + */ + deselectAll() { + this.selectedObjects.splice(0, this.selectedObjects.length); + this.detectChanges(); + } + /** + * @param {?} object + * @return {?} + */ + isEditObject(object) { + return this.selectedObjects.length === 1 && + this.selectedObjects.indexOf(object) !== -1; + } + /** + * @private + * @param {?} x + * @param {?} y + * @param {?} rectBox + * @return {?} + */ + inRectBox(x, y, rectBox) { + return x >= rectBox.left && x <= rectBox.right && + y >= rectBox.top && y <= rectBox.bottom; + } + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + getItemInfoAtPoint(x, y) { + return { + node: this.getNodeAtPoint(x, y), + edge: this.getEdgeAtPoint(x, y) + }; + } + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + getNodeAtPoint(x, y) { + for (const node of this.model.nodes) { + /** @type {?} */ + const element = this.nodes.getHtmlElement(node.id); + /** @type {?} */ + const nodeElementBox = element.getBoundingClientRect(); + if (x >= nodeElementBox.left && x <= nodeElementBox.right + && y >= nodeElementBox.top && y <= nodeElementBox.bottom) { + return node; + } + } + return null; + } + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + getEdgeAtPoint(x, y) { + /** @type {?} */ + const element = document.elementFromPoint(x, y); + /** @type {?} */ + const id = element.id; + /** @type {?} */ + let edgeIndex = -1; + if (id) { + if (id.startsWith('fc-edge-path-')) { + edgeIndex = Number(id.substring('fc-edge-path-'.length)); + } + else if (id.startsWith('fc-edge-label-')) { + edgeIndex = Number(id.substring('fc-edge-label-'.length)); + } + } + if (edgeIndex > -1) { + return this.model.edges[edgeIndex]; + } + return null; + } + /** + * @param {?} rectBox + * @return {?} + */ + selectAllInRect(rectBox) { + this.model.nodes.forEach((/** + * @param {?} value + * @return {?} + */ + (value) => { + /** @type {?} */ + const element = this.nodes.getHtmlElement(value.id); + /** @type {?} */ + const nodeElementBox = element.getBoundingClientRect(); + if (!value.readonly) { + /** @type {?} */ + const x = nodeElementBox.left + nodeElementBox.width / 2; + /** @type {?} */ + const y = nodeElementBox.top + nodeElementBox.height / 2; + if (this.inRectBox(x, y, rectBox)) { + this.nodes.select(value); + } + else { + if (this.nodes.isSelected(value)) { + this.nodes.deselect(value); + } + } + } + })); + /** @type {?} */ + const canvasElementBox = this.canvasHtmlElement.getBoundingClientRect(); + this.model.edges.forEach((/** + * @param {?} value + * @return {?} + */ + (value) => { + /** @type {?} */ + const start = this.edges.sourceCoord(value); + /** @type {?} */ + const end = this.edges.destCoord(value); + /** @type {?} */ + const x = (start.x + end.x) / 2 + canvasElementBox.left; + /** @type {?} */ + const y = (start.y + end.y) / 2 + canvasElementBox.top; + if (this.inRectBox(x, y, rectBox)) { + this.edges.select(value); + } + else { + if (this.edges.isSelected(value)) { + this.edges.deselect(value); + } + } + })); + } + /** + * @return {?} + */ + deleteSelected() { + /** @type {?} */ + const edgesToDelete = this.edges.getSelectedEdges(); + edgesToDelete.forEach((/** + * @param {?} edge + * @return {?} + */ + (edge) => { + this.edges.delete(edge); + })); + /** @type {?} */ + const nodesToDelete = this.nodes.getSelectedNodes(); + nodesToDelete.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + this.nodes.delete(node); + })); + } + /** + * @return {?} + */ + isEditable() { + return this.dropTargetId === undefined; + } + /** + * @return {?} + */ + isDropSource() { + return this.dropTargetId !== undefined; + } + /** + * @return {?} + */ + getDragImage() { + if (!this.dragImage) { + this.dragImage = new Image(); + this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + this.dragImage.style.visibility = 'hidden'; + } + return this.dragImage; + } + /** + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @return {?} + */ + registerCallbacks(edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback) { + this.edgeAddedCallback = edgeAddedCallback; + this.nodeRemovedCallback = nodeRemovedCallback; + this.edgeRemovedCallback = edgeRemovedCallback; + } +} +if (false) { + /** @type {?} */ + FcModelService.prototype.modelValidation; + /** @type {?} */ + FcModelService.prototype.model; + /** @type {?} */ + FcModelService.prototype.cd; + /** @type {?} */ + FcModelService.prototype.selectedObjects; + /** @type {?} */ + FcModelService.prototype.connectorsHtmlElements; + /** @type {?} */ + FcModelService.prototype.nodesHtmlElements; + /** @type {?} */ + FcModelService.prototype.canvasHtmlElement; + /** @type {?} */ + FcModelService.prototype.dragImage; + /** @type {?} */ + FcModelService.prototype.svgHtmlElement; + /** @type {?} */ + FcModelService.prototype.dropNode; + /** @type {?} */ + FcModelService.prototype.createEdge; + /** @type {?} */ + FcModelService.prototype.edgeAddedCallback; + /** @type {?} */ + FcModelService.prototype.nodeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.edgeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.dropTargetId; + /** @type {?} */ + FcModelService.prototype.connectors; + /** @type {?} */ + FcModelService.prototype.nodes; + /** @type {?} */ + FcModelService.prototype.edges; +} +/** + * @record + */ +function HtmlElementMap() { } +/** + * @abstract + * @template T + */ +class AbstractFcModel { + /** + * @protected + * @param {?} modelService + */ + constructor(modelService) { + this.modelService = modelService; + } + /** + * @param {?} object + * @return {?} + */ + select(object) { + this.modelService.selectObject(object); + } + /** + * @param {?} object + * @return {?} + */ + deselect(object) { + this.modelService.deselectObject(object); + } + /** + * @param {?} object + * @return {?} + */ + toggleSelected(object) { + this.modelService.toggleSelectedObject(object); + } + /** + * @param {?} object + * @return {?} + */ + isSelected(object) { + return this.modelService.isSelectedObject(object); + } + /** + * @param {?} object + * @return {?} + */ + isEdit(object) { + return this.modelService.isEditObject(object); + } +} +if (false) { + /** @type {?} */ + AbstractFcModel.prototype.modelService; +} +class ConnectorsModel extends AbstractFcModel { + /** + * @param {?} modelService + */ + constructor(modelService) { + super(modelService); + } + /** + * @param {?} connectorId + * @return {?} + */ + getConnector(connectorId) { + /** @type {?} */ + const model = this.modelService.model; + for (const node of model.nodes) { + for (const connector of node.connectors) { + if (connector.id === connectorId) { + return connector; + } + } + } + } + /** + * @param {?} connectorId + * @return {?} + */ + getHtmlElement(connectorId) { + return this.modelService.connectorsHtmlElements[connectorId]; + } + /** + * @param {?} connectorId + * @param {?} element + * @return {?} + */ + setHtmlElement(connectorId, element) { + this.modelService.connectorsHtmlElements[connectorId] = element; + this.modelService.detectChanges(); + } + /** + * @private + * @param {?} connectorId + * @param {?=} centered + * @return {?} + */ + _getCoords(connectorId, centered) { + /** @type {?} */ + const element = this.getHtmlElement(connectorId); + /** @type {?} */ + const canvas = this.modelService.canvasHtmlElement; + if (element === null || element === undefined || canvas === null) { + return { x: 0, y: 0 }; + } + /** @type {?} */ + const connectorElementBox = element.getBoundingClientRect(); + /** @type {?} */ + const canvasElementBox = canvas.getBoundingClientRect(); + /** @type {?} */ + let coords = { + x: connectorElementBox.left - canvasElementBox.left, + y: connectorElementBox.top - canvasElementBox.top + }; + if (centered) { + coords = { + x: Math.round(coords.x + element.offsetWidth / 2), + y: Math.round(coords.y + element.offsetHeight / 2) + }; + } + return coords; + } + /** + * @param {?} connectorId + * @return {?} + */ + getCoords(connectorId) { + return this._getCoords(connectorId, false); + } + /** + * @param {?} connectorId + * @return {?} + */ + getCenteredCoord(connectorId) { + return this._getCoords(connectorId, true); + } +} +class NodesModel extends AbstractFcModel { + /** + * @param {?} modelService + */ + constructor(modelService) { + super(modelService); + } + /** + * @param {?} node + * @param {?} type + * @return {?} + */ + getConnectorsByType(node, type) { + return node.connectors.filter((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + return connector.type === type; + })); + } + /** + * @private + * @param {?} node + * @param {?} connector + * @return {?} + */ + _addConnector(node, connector) { + node.connectors.push(connector); + try { + this.modelService.modelValidation.validateNode(node); + } + catch (error) { + node.connectors.splice(node.connectors.indexOf(connector), 1); + throw error; + } + } + /** + * @param {?} node + * @return {?} + */ + delete(node) { + if (this.isSelected(node)) { + this.deselect(node); + } + /** @type {?} */ + const model = this.modelService.model; + /** @type {?} */ + const index = model.nodes.indexOf(node); + if (index === -1) { + if (node === undefined) { + throw new Error('Passed undefined'); + } + throw new Error('Tried to delete not existing node'); + } + /** @type {?} */ + const connectorIds = this.getConnectorIds(node); + for (let i = 0; i < model.edges.length; i++) { + /** @type {?} */ + const edge = model.edges[i]; + if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) { + this.modelService.edges.delete(edge); + i--; + } + } + model.nodes.splice(index, 1); + this.modelService.nodeRemovedCallback(node); + } + /** + * @return {?} + */ + getSelectedNodes() { + /** @type {?} */ + const model = this.modelService.model; + return model.nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => { + return this.modelService.nodes.isSelected(node); + })); + } + /** + * @param {?} node + * @param {?=} ctrlKey + * @return {?} + */ + handleClicked(node, ctrlKey) { + if (ctrlKey) { + this.modelService.nodes.toggleSelected(node); + } + else { + this.modelService.deselectAll(); + this.modelService.nodes.select(node); + } + } + /** + * @private + * @param {?} node + * @return {?} + */ + _addNode(node) { + /** @type {?} */ + const model = this.modelService.model; + try { + model.nodes.push(node); + this.modelService.modelValidation.validateNodes(model.nodes); + } + catch (error) { + model.nodes.splice(model.nodes.indexOf(node), 1); + throw error; + } + } + /** + * @param {?} node + * @return {?} + */ + getConnectorIds(node) { + return node.connectors.map((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + return connector.id; + })); + } + /** + * @param {?} connectorId + * @return {?} + */ + getNodeByConnectorId(connectorId) { + /** @type {?} */ + const model = this.modelService.model; + for (const node of model.nodes) { + /** @type {?} */ + const connectorIds = this.getConnectorIds(node); + if (connectorIds.indexOf(connectorId) > -1) { + return node; + } + } + return null; + } + /** + * @param {?} nodeId + * @return {?} + */ + getHtmlElement(nodeId) { + return this.modelService.nodesHtmlElements[nodeId]; + } + /** + * @param {?} nodeId + * @param {?} element + * @return {?} + */ + setHtmlElement(nodeId, element) { + this.modelService.nodesHtmlElements[nodeId] = element; + this.modelService.detectChanges(); + } +} +class EdgesModel extends AbstractFcModel { + /** + * @param {?} modelService + */ + constructor(modelService) { + super(modelService); + } + /** + * @param {?} edge + * @return {?} + */ + ready(edge) { + /** @type {?} */ + const source = this.modelService.connectors.getHtmlElement(edge.source); + /** @type {?} */ + const destination = this.modelService.connectors.getHtmlElement(edge.destination); + return source !== undefined && destination !== undefined; + } + /** + * @param {?} edge + * @return {?} + */ + sourceCoord(edge) { + return this.modelService.connectors.getCenteredCoord(edge.source); + } + /** + * @param {?} edge + * @return {?} + */ + destCoord(edge) { + return this.modelService.connectors.getCenteredCoord(edge.destination); + } + /** + * @param {?} edge + * @return {?} + */ + delete(edge) { + /** @type {?} */ + const model = this.modelService.model; + /** @type {?} */ + const index = model.edges.indexOf(edge); + if (index === -1) { + throw new Error('Tried to delete not existing edge'); + } + if (this.isSelected(edge)) { + this.deselect(edge); + } + model.edges.splice(index, 1); + this.modelService.edgeRemovedCallback(edge); + } + /** + * @return {?} + */ + getSelectedEdges() { + /** @type {?} */ + const model = this.modelService.model; + return model.edges.filter((/** + * @param {?} edge + * @return {?} + */ + (edge) => { + return this.modelService.edges.isSelected(edge); + })); + } + /** + * @param {?} edge + * @param {?=} ctrlKey + * @return {?} + */ + handleEdgeMouseClick(edge, ctrlKey) { + if (ctrlKey) { + this.modelService.edges.toggleSelected(edge); + } + else { + this.modelService.deselectAll(); + this.modelService.edges.select(edge); + } + } + /** + * @param {?} edge + * @return {?} + */ + putEdge(edge) { + /** @type {?} */ + const model = this.modelService.model; + model.edges.push(edge); + } + /** + * @param {?} event + * @param {?} sourceConnector + * @param {?} destConnector + * @param {?} label + * @return {?} + */ + _addEdge(event, sourceConnector, destConnector, label) { + this.modelService.modelValidation.validateConnector(sourceConnector); + this.modelService.modelValidation.validateConnector(destConnector); + /** @type {?} */ + const edge = {}; + edge.source = sourceConnector.id; + edge.destination = destConnector.id; + edge.label = label; + /** @type {?} */ + const model = this.modelService.model; + this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes); + this.modelService.createEdge(event, edge).subscribe((/** + * @param {?} created + * @return {?} + */ + (created) => { + model.edges.push(created); + this.modelService.edgeAddedCallback(created); + })); + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kZWwuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJsaWIvbW9kZWwuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBRUEsT0FBTyxFQUFjLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUd0QyxNQUFNLE9BQU8sY0FBYzs7Ozs7Ozs7Ozs7Ozs7SUF5QnpCLFlBQVksZUFBeUMsRUFDekMsS0FBYyxFQUNkLEVBQXFCLEVBQ3JCLGVBQXNCLEVBQ3RCLFFBQThDLEVBQzlDLFVBQThELEVBQzlELGlCQUF5QyxFQUN6QyxtQkFBMkMsRUFDM0MsbUJBQTJDLEVBQzNDLG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bCA9IHRoaXMubW9kZWxTZXJ2aWNlLm1vZGVsO1xuICAgIHRoaXMubW9kZWxTZXJ2aWNlLm1vZGVsVmFsaWRhdGlvbi52YWxpZGF0ZUVkZ2VzKG1vZGVsLmVkZ2VzLmNvbmNhdChbZWRnZV0pLCBtb2RlbC5ub2Rlcyk7XG4gICAgdGhpcy5tb2RlbFNlcnZpY2UuY3JlYXRlRWRnZShldmVudCwgZWRnZSkuc3Vic2NyaWJlKFxuICAgICAgKGNyZWF0ZWQpID0+IHtcbiAgICAgICAgbW9kZWwuZWRnZXMucHVzaChjcmVhdGVkKTtcbiAgICAgICAgdGhpcy5tb2RlbFNlcnZpY2UuZWRnZUFkZGVkQ2FsbGJhY2soY3JlYXRlZCk7XG4gICAgICB9XG4gICAgKTtcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/modelvalidation.service.js b/dist/ngx-flowchart/esm2015/lib/modelvalidation.service.js new file mode 100644 index 0000000..04dc1ad --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/modelvalidation.service.js @@ -0,0 +1,208 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { Injectable } from '@angular/core'; +import { fcTopSort, ModelvalidationError } from './ngx-flowchart.models'; +export class FcModelValidationService { + constructor() { } + /** + * @param {?} model + * @return {?} + */ + validateModel(model) { + this.validateNodes(model.nodes); + this._validateEdges(model.edges, model.nodes); + return model; + } + /** + * @param {?} nodes + * @return {?} + */ + validateNodes(nodes) { + /** @type {?} */ + const ids = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + this.validateNode(node); + if (ids.indexOf(node.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + ids.push(node.id); + })); + /** @type {?} */ + const connectorIds = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + if (connectorIds.indexOf(connector.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + connectorIds.push(connector.id); + })); + })); + return nodes; + } + /** + * @param {?} node + * @return {?} + */ + validateNode(node) { + if (node.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (typeof node.name !== 'string') { + throw new ModelvalidationError('Name not valid.'); + } + if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (!Array.isArray(node.connectors)) { + throw new ModelvalidationError('Connectors not valid.'); + } + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + this.validateConnector(connector); + })); + return node; + } + /** + * @private + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + _validateEdges(edges, nodes) { + edges.forEach((/** + * @param {?} edge + * @return {?} + */ + (edge) => { + this._validateEdge(edge, nodes); + })); + edges.forEach((/** + * @param {?} edge1 + * @param {?} index1 + * @return {?} + */ + (edge1, index1) => { + edges.forEach((/** + * @param {?} edge2 + * @param {?} index2 + * @return {?} + */ + (edge2, index2) => { + if (index1 !== index2) { + if ((edge1.source === edge2.source && edge1.destination === edge2.destination) || + (edge1.source === edge2.destination && edge1.destination === edge2.source)) { + throw new ModelvalidationError('Duplicated edge.'); + } + } + })); + })); + if (fcTopSort({ nodes, edges }) === null) { + throw new ModelvalidationError('Graph has a circle.'); + } + return edges; + } + /** + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + validateEdges(edges, nodes) { + this.validateNodes(nodes); + return this._validateEdges(edges, nodes); + } + /** + * @private + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + _validateEdge(edge, nodes) { + if (edge.source === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + if (edge.destination === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (edge.source === edge.destination) { + throw new ModelvalidationError('Edge with same source and destination connectors.'); + } + /** @type {?} */ + const sourceNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + (connector) => connector.id === edge.source))))[0]; + if (sourceNode === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + /** @type {?} */ + const destinationNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + (connector) => connector.id === edge.destination))))[0]; + if (destinationNode === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (sourceNode === destinationNode) { + throw new ModelvalidationError('Edge with same source and destination nodes.'); + } + return edge; + } + /** + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + validateEdge(edge, nodes) { + this.validateNodes(nodes); + return this._validateEdge(edge, nodes); + } + /** + * @param {?} connector + * @return {?} + */ + validateConnector(connector) { + if (connector.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') { + throw new ModelvalidationError('Type not valid.'); + } + return connector; + } +} +FcModelValidationService.decorators = [ + { type: Injectable } +]; +/** @nocollapse */ +FcModelValidationService.ctorParameters = () => []; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kZWx2YWxpZGF0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL21vZGVsdmFsaWRhdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBd0MsU0FBUyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFHL0csTUFBTSxPQUFPLHdCQUF3QjtJQUVuQyxnQkFBZ0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VzKG5vZGVzKTtcbiAgICByZXR1cm4gdGhpcy5fdmFsaWRhdGVFZGdlKGVkZ2UsIG5vZGVzKTtcbiAgfVxuXG4gIHB1YmxpYyB2YWxpZGF0ZUNvbm5lY3Rvcihjb25uZWN0b3I6IEZjQ29ubmVjdG9yKTogRmNDb25uZWN0b3Ige1xuICAgIGlmIChjb25uZWN0b3IuaWQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgdGhyb3cgbmV3IE1vZGVsdmFsaWRhdGlvbkVycm9yKCdJZCBub3QgdmFsaWQuJyk7XG4gICAgfVxuICAgIGlmIChjb25uZWN0b3IudHlwZSA9PT0gdW5kZWZpbmVkIHx8IGNvbm5lY3Rvci50eXBlID09PSBudWxsIHx8IHR5cGVvZiBjb25uZWN0b3IudHlwZSAhPT0gJ3N0cmluZycpIHtcbiAgICAgIHRocm93IG5ldyBNb2RlbHZhbGlkYXRpb25FcnJvcignVHlwZSBub3QgdmFsaWQuJyk7XG4gICAgfVxuICAgIHJldHVybiBjb25uZWN0b3I7XG4gIH1cblxufVxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/mouseover.service.js b/dist/ngx-flowchart/esm2015/lib/mouseover.service.js new file mode 100644 index 0000000..18bc59c --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/mouseover.service.js @@ -0,0 +1,107 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +export class FcMouseOverService { + /** + * @param {?} applyFunction + */ + constructor(applyFunction) { + this.mouseoverscope = { + connector: null, + edge: null, + node: null + }; + this.applyFunction = applyFunction; + } + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + nodeMouseOver(event, node) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.mouseoverscope.node = node; + })); + } + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + nodeMouseOut(event, node) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.mouseoverscope.node = null; + })); + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + connectorMouseEnter(event, connector) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.mouseoverscope.connector = connector; + })); + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + connectorMouseLeave(event, connector) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.mouseoverscope.connector = null; + })); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseEnter(event, edge) { + this.mouseoverscope.edge = edge; + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseLeave(event, edge) { + this.mouseoverscope.edge = null; + } +} +if (false) { + /** @type {?} */ + FcMouseOverService.prototype.mouseoverscope; + /** + * @type {?} + * @private + */ + FcMouseOverService.prototype.applyFunction; +} +/** + * @record + */ +export function MouseOverScope() { } +if (false) { + /** @type {?} */ + MouseOverScope.prototype.connector; + /** @type {?} */ + MouseOverScope.prototype.edge; + /** @type {?} */ + MouseOverScope.prototype.node; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW91c2VvdmVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL21vdXNlb3Zlci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFFQSxNQUFNLE9BQU8sa0JBQWtCOzs7O0lBVTdCLFlBQVksYUFBa0Q7UUFSOUQsbUJBQWMsR0FBbUI7WUFDL0IsU0FBUyxFQUFFLElBQUk7WUFDZixJQUFJLEVBQUUsSUFBSTtZQUNWLElBQUksRUFBRSxJQUFJO1NBQ1gsQ0FBQztRQUtBLElBQUksQ0FBQyxhQUFhLEdBQUcsYUFBYSxDQUFDO0lBQ3JDLENBQUM7Ozs7OztJQUVNLGFBQWEsQ0FBQyxLQUFpQixFQUFFLElBQVk7UUFDbEQsT0FBT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HVibGljIGNvbm5lY3Rvck1vdXNlRW50ZXIoZXZlbnQ6IE1vdXNlRXZlbnQsIGNvbm5lY3RvcjogRmNDb25uZWN0b3IpIHtcbiAgICByZXR1cm4gdGhpcy5hcHBseUZ1bmN0aW9uKCgpID0+IHtcbiAgICAgIHRoaXMubW91c2VvdmVyc2NvcGUuY29ubmVjdG9yID0gY29ubmVjdG9yO1xuICAgIH0pO1xuICB9XG5cbiAgcHVibGljIGNvbm5lY3Rvck1vdXNlTGVhdmUoZXZlbnQ6IE1vdXNlRXZlbnQsIGNvbm5lY3RvcjogRmNDb25uZWN0b3IpIHtcbiAgICByZXR1cm4gdGhpcy5hcHBseUZ1bmN0aW9uKCgpID0+IHtcbiAgICAgIHRoaXMubW91c2VvdmVyc2NvcGUuY29ubmVjdG9yID0gbnVsbDtcbiAgICB9KTtcbiAgfVxuXG4gIHB1YmxpYyBlZGdlTW91c2VFbnRlcihldmVudDogTW91c2VFdmVudCwgZWRnZTogRmNFZGdlKSB7XG4gICAgdGhpcy5tb3VzZW92ZXJzY29wZS5lZGdlID0gZWRnZTtcbiAgfVxuXG4gIHB1YmxpYyBlZGdlTW91c2VMZWF2ZShldmVudDogTW91c2VFdmVudCwgZWRnZTogRmNFZGdlKSB7XG4gICAgdGhpcy5tb3VzZW92ZXJzY29wZS5lZGdlID0gbnVsbDtcbiAgfVxufVxuXG5leHBvcnQgaW50ZXJmYWNlIE1vdXNlT3ZlclNjb3BlIHtcbiAgY29ubmVjdG9yOiBGY0Nvbm5lY3RvcjtcbiAgZWRnZTogRmNFZGdlO1xuICBub2RlOiBGY05vZGU7XG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.component.js b/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.component.js index 1daf45b..5536c42 100644 --- a/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.component.js +++ b/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.component.js @@ -2,25 +2,436 @@ * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ -import { Component } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, HostBinding, HostListener, Input, IterableDiffers, NgZone } from '@angular/core'; +import { FlowchartConstants } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +import { FcModelValidationService } from './modelvalidation.service'; +import { FcNodeDraggingService } from './node-dragging.service'; +import { FcEdgeDrawingService } from './edge-drawing.service'; +import { FcEdgeDraggingService } from './edge-dragging.service'; +import { FcMouseOverService } from './mouseover.service'; +import { FcRectangleSelectService } from './rectangleselect.service'; export class NgxFlowchartComponent { - constructor() { } + /** + * @param {?} elementRef + * @param {?} differs + * @param {?} modelValidation + * @param {?} edgeDrawingService + * @param {?} cd + * @param {?} zone + */ + constructor(elementRef, differs, modelValidation, edgeDrawingService, cd, zone) { + this.elementRef = elementRef; + this.differs = differs; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.cd = cd; + this.zone = zone; + this.flowchartConstants = FlowchartConstants; + this.nodesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + (index, item) => { + return item; + })); + this.edgesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + (index, item) => { + return item; + })); + this.arrowDefId = 'arrow-' + Math.random(); + this.arrowDefIdSelected = this.arrowDefId + '-selected'; + } + /** + * @return {?} + */ + get canvasClass() { + return FlowchartConstants.canvasClass; + } /** * @return {?} */ ngOnInit() { + if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) { + throw new Error('edgeStyle not supported.'); + } + this.nodeHeight = this.nodeHeight || 200; + this.nodeWidth = this.nodeWidth || 200; + this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint; + this.userCallbacks = this.userCallbacks || {}; + this.automaticResize = this.automaticResize || false; + for (const key of Object.keys(this.userCallbacks)) { + /** @type {?} */ + const callback = this.userCallbacks[key]; + if (typeof callback !== 'function' && key !== 'nodeCallbacks') { + throw new Error('All callbacks should be functions.'); + } + } + this.userNodeCallbacks = this.userCallbacks.nodeCallbacks; + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects, this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved, this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg')); + if (this.dropTargetId) { + this.modelService.dropTargetId = this.dropTargetId; + } + /** @type {?} */ + const applyFunction = this.zone.run.bind(this.zone); + this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction, this.automaticResize, this.dragAnimation); + this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService, this.model, this.userCallbacks.isValidEdge || null, applyFunction, this.dragAnimation, this.edgeStyle); + this.mouseoverService = new FcMouseOverService(applyFunction); + this.rectangleSelectService = new FcRectangleSelectService(this.modelService, element[0].querySelector('#select-rectangle'), applyFunction); + this.callbacks = { + nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService), + nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService), + edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService), + edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService), + edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService), + edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService), + edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService), + edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService), + nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService), + nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService), + connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService), + connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService), + nodeClicked: (/** + * @param {?} event + * @param {?} node + * @return {?} + */ + (event, node) => { + this.modelService.nodes.handleClicked(node, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + }) + }; + this.adjustCanvasSize(true); + } + /** + * @return {?} + */ + ngDoCheck() { + if (this.model) { + /** @type {?} */ + const nodesChange = this.nodesDiffer.diff(this.model.nodes); + /** @type {?} */ + const edgesChange = this.edgesDiffer.diff(this.model.edges); + /** @type {?} */ + let nodesChanged = false; + /** @type {?} */ + let edgesChanged = false; + if (nodesChange !== null) { + nodesChange.forEachAddedItem((/** + * @return {?} + */ + () => { + nodesChanged = true; + })); + nodesChange.forEachRemovedItem((/** + * @return {?} + */ + () => { + nodesChanged = true; + })); + } + if (edgesChange !== null) { + edgesChange.forEachAddedItem((/** + * @return {?} + */ + () => { + edgesChanged = true; + })); + edgesChange.forEachRemovedItem((/** + * @return {?} + */ + () => { + edgesChanged = true; + })); + } + if (nodesChanged) { + this.adjustCanvasSize(true); + } + if (nodesChanged || edgesChanged) { + this.cd.detectChanges(); + } + } + } + /** + * @param {?} edge + * @return {?} + */ + getEdgeDAttribute(edge) { + return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge), this.modelService.edges.destCoord(edge), this.edgeStyle); + } + /** + * @param {?=} fit + * @return {?} + */ + adjustCanvasSize(fit) { + /** @type {?} */ + let maxX = 0; + /** @type {?} */ + let maxY = 0; + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + maxX = Math.max(node.x + this.nodeWidth, maxX); + maxY = Math.max(node.y + this.nodeHeight, maxY); + })); + /** @type {?} */ + let width; + /** @type {?} */ + let height; + if (fit) { + width = maxX; + height = maxY; + } + else { + width = Math.max(maxX, element.prop('offsetWidth')); + height = Math.max(maxY, element.prop('offsetHeight')); + } + element.css('width', width + 'px'); + element.css('height', height + 'px'); + } + /** + * @param {?} event + * @return {?} + */ + canvasClick(event) { } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseDown(event, edge) { + event.stopPropagation(); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeClick(event, edge) { + this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeRemove(event, edge) { + this.modelService.edges.delete(edge); + event.stopPropagation(); + event.preventDefault(); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeEdit(event, edge) { + if (this.userCallbacks.edgeEdit) { + this.userCallbacks.edgeEdit(event, edge); + } + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeDoubleClick(event, edge) { + if (this.userCallbacks.edgeDoubleClick) { + this.userCallbacks.edgeDoubleClick(event, edge); + } + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseOver(event, edge) { + if (this.userCallbacks.edgeMouseOver) { + this.userCallbacks.edgeMouseOver(event, edge); + } + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseEnter(event, edge) { + this.mouseoverService.edgeMouseEnter(event, edge); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseLeave(event, edge) { + this.mouseoverService.edgeMouseLeave(event, edge); + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + this.nodeDraggingService.dragover(event); + this.edgeDraggingService.dragover(event); + } + /** + * @param {?} event + * @return {?} + */ + drop(event) { + if (event.preventDefault) { + event.preventDefault(); + } + if (event.stopPropagation) { + event.stopPropagation(); + } + this.nodeDraggingService.drop(event); + } + /** + * @param {?} event + * @return {?} + */ + mousedown(event) { + this.rectangleSelectService.mousedown(event); + } + /** + * @param {?} event + * @return {?} + */ + mousemove(event) { + this.rectangleSelectService.mousemove(event); + } + /** + * @param {?} event + * @return {?} + */ + mouseup(event) { + this.rectangleSelectService.mouseup(event); } } NgxFlowchartComponent.decorators = [ { type: Component, args: [{ selector: 'fc-canvas', - template: ` -

- ngx-flowchart works! -

- ` + template: "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {{edgeDraggingService.edgeDragging.dragLabel}}\n
\n
\n \n
\n
\n \n
\n
\n ×\n
\n {{edge.label}}\n
\n
\n \n\n", + changeDetection: ChangeDetectionStrategy.OnPush, + styles: [":host{display:block;position:relative;width:100%;height:100%;background-size:25px 25px;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.1) 1px,transparent 1px);background-color:transparent;min-width:100%;min-height:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-canvas-container{display:block;position:relative;width:100%;height:100%}:host .fc-canvas-container svg.fc-canvas-svg{display:block;position:relative;width:100%;height:100%}:host .fc-edge{stroke:gray;stroke-width:4;transition:stroke-width .2s;fill:transparent}:host .fc-edge.fc-hover{stroke:gray;stroke-width:6;fill:transparent}:host .fc-edge.fc-selected{stroke:red;stroke-width:4;fill:transparent}:host .fc-edge.fc-active{-webkit-animation:3s linear infinite dash;animation:3s linear infinite dash;stroke-dasharray:20}:host .fc-edge.fc-dragging{pointer-events:none}:host .fc-arrow-marker polygon{stroke:gray;fill:gray}:host .fc-arrow-marker-selected polygon{stroke:red;fill:red}:host .edge-endpoint{fill:gray}:host .fc-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-edge-label{position:absolute;opacity:.8;transition:transform .2s;transform-origin:bottom left;margin:0 auto}:host .fc-edge-label .fc-edge-label-text{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;text-align:center;font-size:16px}:host .fc-edge-label .fc-edge-label-text span{cursor:default;border:solid #ff3d00;border-radius:10px;color:#ff3d00;background-color:#fff;padding:3px 5px}:host .fc-edge-label .fc-nodeedit{top:-30px;right:14px}:host .fc-edge-label .fc-nodedelete{top:-30px;right:-13px}:host .fc-edge-label.fc-hover{transform:scale(1.25)}:host .fc-edge-label.fc-edit .fc-edge-label-text span,:host .fc-edge-label.fc-selected .fc-edge-label-text span{border:solid red;color:#fff;font-weight:600;background-color:red}:host .fc-select-rectangle{border:2px dashed #5262ff;position:absolute;background:rgba(20,125,255,.1);z-index:2}@-webkit-keyframes dash{from{stroke-dashoffset:500}}@keyframes dash{from{stroke-dashoffset:500}}:host ::ng-deep .fc-nodeedit{display:none;font-size:15px}:host ::ng-deep .fc-nodedelete{display:none;font-size:18px}:host ::ng-deep .fc-edit .fc-nodedelete,:host ::ng-deep .fc-edit .fc-nodeedit{display:block;position:absolute;border:2px solid #eee;border-radius:50%;font-weight:600;line-height:20px;height:20px;padding-top:2px;width:22px;background:#494949;color:#fff;text-align:center;vertical-align:bottom;cursor:pointer}:host ::ng-deep .fc-edit .fc-nodeedit{top:-24px;right:16px}:host ::ng-deep .fc-edit .fc-nodedelete{top:-24px;right:-13px}"] }] } ]; /** @nocollapse */ -NgxFlowchartComponent.ctorParameters = () => []; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25neC1mbG93Y2hhcnQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBV2xELE1BQU0sT0FBTyxxQkFBcUI7SUFFaEMsZ0JBQWdCLENBQUM7Ozs7SUFFakIsUUFBUTtJQUNSLENBQUM7OztZQWRGLFNBQVMsU0FBQztnQkFDVCxRQUFRLEVBQUUsV0FBVztnQkFDckIsUUFBUSxFQUFFOzs7O0dBSVQ7YUFFRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCwgT25Jbml0IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBDb21wb25lbnQoe1xuICBzZWxlY3RvcjogJ2ZjLWNhbnZhcycsXG4gIHRlbXBsYXRlOiBgXG4gICAgPHA+XG4gICAgICBuZ3gtZmxvd2NoYXJ0IHdvcmtzIVxuICAgIDwvcD5cbiAgYCxcbiAgc3R5bGVzOiBbXVxufSlcbmV4cG9ydCBjbGFzcyBOZ3hGbG93Y2hhcnRDb21wb25lbnQgaW1wbGVtZW50cyBPbkluaXQge1xuXG4gIGNvbnN0cnVjdG9yKCkgeyB9XG5cbiAgbmdPbkluaXQoKSB7XG4gIH1cblxufVxuIl19 \ No newline at end of file +NgxFlowchartComponent.ctorParameters = () => [ + { type: ElementRef }, + { type: IterableDiffers }, + { type: FcModelValidationService }, + { type: FcEdgeDrawingService }, + { type: ChangeDetectorRef }, + { type: NgZone } +]; +NgxFlowchartComponent.propDecorators = { + canvasClass: [{ type: HostBinding, args: ['attr.class',] }], + model: [{ type: Input }], + selectedObjects: [{ type: Input }], + edgeStyle: [{ type: Input }], + userCallbacks: [{ type: Input }], + automaticResize: [{ type: Input }], + dragAnimation: [{ type: Input }], + nodeWidth: [{ type: Input }], + nodeHeight: [{ type: Input }], + dropTargetId: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }], + mousemove: [{ type: HostListener, args: ['mousemove', ['$event'],] }], + mouseup: [{ type: HostListener, args: ['mouseup', ['$event'],] }] +}; +if (false) { + /** @type {?} */ + NgxFlowchartComponent.prototype.model; + /** @type {?} */ + NgxFlowchartComponent.prototype.selectedObjects; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeStyle; + /** @type {?} */ + NgxFlowchartComponent.prototype.userCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.automaticResize; + /** @type {?} */ + NgxFlowchartComponent.prototype.dragAnimation; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeWidth; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeHeight; + /** @type {?} */ + NgxFlowchartComponent.prototype.dropTargetId; + /** @type {?} */ + NgxFlowchartComponent.prototype.callbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.userNodeCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.modelService; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.mouseoverService; + /** @type {?} */ + NgxFlowchartComponent.prototype.rectangleSelectService; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefId; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefIdSelected; + /** @type {?} */ + NgxFlowchartComponent.prototype.flowchartConstants; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.nodesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.edgesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.differs; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.modelValidation; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.cd; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.zone; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25neC1mbG93Y2hhcnQu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3BhZ2F0aW9uKCk7XG4gICAgfVxuICAgIHRoaXMubm9kZURyYWdnaW5nU2VydmljZS5kcm9wKGV2ZW50KTtcbiAgfVxuXG4gIEBIb3N0TGlzdGVuZXIoJ21vdXNlZG93bicsIFsnJGV2ZW50J10pXG4gIG1vdXNlZG93bihldmVudDogTW91c2VFdmVudCkge1xuICAgIHRoaXMucmVjdGFuZ2xlU2VsZWN0U2VydmljZS5tb3VzZWRvd24oZXZlbnQpO1xuICB9XG5cbiAgQEhvc3RMaXN0ZW5lcignbW91c2Vtb3ZlJywgWyckZXZlbnQnXSlcbiAgbW91c2Vtb3ZlKGV2ZW50OiBNb3VzZUV2ZW50KSB7XG4gICAgdGhpcy5yZWN0YW5nbGVTZWxlY3RTZXJ2aWNlLm1vdXNlbW92ZShldmVudCk7XG4gIH1cblxuICBASG9zdExpc3RlbmVyKCdtb3VzZXVwJywgWyckZXZlbnQnXSlcbiAgbW91c2V1cChldmVudDogTW91c2VFdmVudCkge1xuICAgIHRoaXMucmVjdGFuZ2xlU2VsZWN0U2VydmljZS5tb3VzZXVwKGV2ZW50KTtcbiAgfVxuXG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.models.js b/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.models.js new file mode 100644 index 0000000..5b7c95c --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.models.js @@ -0,0 +1,319 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { InjectionToken } from '@angular/core'; +/** @type {?} */ +export const FC_NODE_COMPONENT_CONFIG = new InjectionToken('fc-node.component.config'); +/** + * @record + */ +export function FcNodeComponentConfig() { } +if (false) { + /** @type {?} */ + FcNodeComponentConfig.prototype.nodeComponentType; +} +/** @type {?} */ +const htmlPrefix = 'fc'; +/** @type {?} */ +const leftConnectorType = 'leftConnector'; +/** @type {?} */ +const rightConnectorType = 'rightConnector'; +/** @type {?} */ +export const FlowchartConstants = { + htmlPrefix, + leftConnectorType, + rightConnectorType, + curvedStyle: 'curved', + lineStyle: 'line', + dragAnimationRepaint: 'repaint', + dragAnimationShadow: 'shadow', + canvasClass: htmlPrefix + '-canvas', + selectedClass: htmlPrefix + '-selected', + editClass: htmlPrefix + '-edit', + activeClass: htmlPrefix + '-active', + hoverClass: htmlPrefix + '-hover', + draggingClass: htmlPrefix + '-dragging', + edgeClass: htmlPrefix + '-edge', + edgeLabelClass: htmlPrefix + '-edge-label', + connectorClass: htmlPrefix + '-connector', + magnetClass: htmlPrefix + '-magnet', + nodeClass: htmlPrefix + '-node', + nodeOverlayClass: htmlPrefix + '-node-overlay', + leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's', + rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's', + canvasResizeThreshold: 200, + canvasResizeStep: 200 +}; +/** + * @record + */ +export function FcCoords() { } +if (false) { + /** @type {?|undefined} */ + FcCoords.prototype.x; + /** @type {?|undefined} */ + FcCoords.prototype.y; +} +/** + * @record + */ +export function FcOffset() { } +if (false) { + /** @type {?} */ + FcOffset.prototype.top; + /** @type {?} */ + FcOffset.prototype.left; +} +/** + * @record + */ +export function FcRectBox() { } +if (false) { + /** @type {?} */ + FcRectBox.prototype.top; + /** @type {?} */ + FcRectBox.prototype.left; + /** @type {?} */ + FcRectBox.prototype.right; + /** @type {?} */ + FcRectBox.prototype.bottom; +} +/** + * @record + */ +export function FcConnector() { } +if (false) { + /** @type {?} */ + FcConnector.prototype.id; + /** @type {?} */ + FcConnector.prototype.type; +} +/** + * @record + */ +export function FcNode() { } +if (false) { + /** @type {?} */ + FcNode.prototype.id; + /** @type {?} */ + FcNode.prototype.name; + /** @type {?} */ + FcNode.prototype.connectors; + /** @type {?|undefined} */ + FcNode.prototype.readonly; + /* Skipping unhandled member: [key: string]: any;*/ +} +/** + * @record + */ +export function FcEdge() { } +if (false) { + /** @type {?|undefined} */ + FcEdge.prototype.label; + /** @type {?|undefined} */ + FcEdge.prototype.source; + /** @type {?|undefined} */ + FcEdge.prototype.destination; + /** @type {?|undefined} */ + FcEdge.prototype.active; +} +/** + * @record + */ +export function FcItemInfo() { } +if (false) { + /** @type {?|undefined} */ + FcItemInfo.prototype.node; + /** @type {?|undefined} */ + FcItemInfo.prototype.edge; +} +/** + * @record + */ +export function FcModel() { } +if (false) { + /** @type {?} */ + FcModel.prototype.nodes; + /** @type {?} */ + FcModel.prototype.edges; +} +/** + * @record + */ +export function UserCallbacks() { } +if (false) { + /** @type {?|undefined} */ + UserCallbacks.prototype.dropNode; + /** @type {?|undefined} */ + UserCallbacks.prototype.createEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeAdded; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeDoubleClick; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeMouseOver; + /** @type {?|undefined} */ + UserCallbacks.prototype.isValidEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeEdit; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeCallbacks; +} +/** + * @record + */ +export function UserNodeCallbacks() { } +if (false) { + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.nodeEdit; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.doubleClick; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseDown; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseEnter; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseLeave; +} +/** + * @record + */ +export function FcCallbacks() { } +if (false) { + /** @type {?} */ + FcCallbacks.prototype.nodeDragstart; + /** @type {?} */ + FcCallbacks.prototype.nodeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDragstart; + /** @type {?} */ + FcCallbacks.prototype.edgeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDrop; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverConnector; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverMagnet; + /** @type {?} */ + FcCallbacks.prototype.edgeDragleaveMagnet; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOver; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOut; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseEnter; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseLeave; + /** @type {?} */ + FcCallbacks.prototype.nodeClicked; +} +/** + * @record + */ +export function FcAdjacentList() { } +export class ModelvalidationError extends Error { + /** + * @param {?} message + */ + constructor(message) { + super(message); + } +} +/** + * @param {?} graph + * @return {?} + */ +export function fcTopSort(graph) { + /** @type {?} */ + const adjacentList = {}; + graph.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + adjacentList[node.id] = { incoming: 0, outgoing: [] }; + })); + graph.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + (edge) => { + /** @type {?} */ + const sourceNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + return connector.id === edge.source; + })); + }))[0]; + /** @type {?} */ + const destinationNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + return connector.id === edge.destination; + })); + }))[0]; + adjacentList[sourceNode.id].outgoing.push(destinationNode.id); + adjacentList[destinationNode.id].incoming++; + })); + /** @type {?} */ + const orderedNodes = []; + /** @type {?} */ + const sourceNodes = []; + for (const node of Object.keys(adjacentList)) { + /** @type {?} */ + const edges = adjacentList[node]; + if (edges.incoming === 0) { + sourceNodes.push(node); + } + } + while (sourceNodes.length !== 0) { + /** @type {?} */ + const sourceNode = sourceNodes.pop(); + for (let i = 0; i < adjacentList[sourceNode].outgoing.length; i++) { + /** @type {?} */ + const destinationNode = adjacentList[sourceNode].outgoing[i]; + adjacentList[destinationNode].incoming--; + if (adjacentList[destinationNode].incoming === 0) { + sourceNodes.push(destinationNode); + } + adjacentList[sourceNode].outgoing.splice(i, 1); + i--; + } + orderedNodes.push(sourceNode); + } + /** @type {?} */ + let hasEdges = false; + for (const node of Object.keys(adjacentList)) { + /** @type {?} */ + const edges = adjacentList[node]; + if (edges.incoming !== 0) { + hasEdges = true; + } + } + if (hasEdges) { + return null; + } + else { + return orderedNodes; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5tb2RlbHMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25neC1mbG93Y2hhcnQubW9kZWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxPQUFPLEVBQUUsY0FBYyxFQUFRLE1BQU0sZUFBZSxDQUFDOztBQUdyRCxNQUFNLE9BQU8sd0JBQXdCLEdBQUcsSUFBSSxjQUFjLENBQXdCLDBCQUEwQixDQUFDOzs7O0FBRTdHLDJDQUVDOzs7SUFEQyxrREFBeUM7OztNQUdyQyxVQUFVLEdBQUcsSUFBSTs7TUFDakIsaUJBQWlCLEdBQUcsZUFBZTs7TUFDbkMsa0JBQWtCLEdBQUcsZ0JBQWdCOztBQUUzQyxNQUFNLE9BQU8sa0JBQWtCLEdBQUc7SUFDaEMsVUFBVTtJQUNWLGlCQUFpQjtJQUNqQixrQkFBa0I7SUFDbEIsV0FBVyxFQUFFLFFBQVE7SUFDckIsU0FBUyxFQUFFLE1BQU07SUFDakIsb0JBQW9CLEVBQUUsU0FBUztJQUMvQixtQkFBbUIsRUFBRSxRQUFRO0lBQzdCLFdBQVcsRUFBRSxVQUFVLEdBQUcsU0FBUztJQUNuQyxhQUFhLEVBQUUsVUFBVSxHQUFHLFdBQVc7SUFDdkMsU0FBUyxFQUFFLFVBQV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dLmluY29taW5nLS07XG4gICAgICBpZiAoYWRqYWNlbnRMaXN0W2Rlc3RpbmF0aW9uTm9kZV0uaW5jb21pbmcgPT09IDApIHtcbiAgICAgICAgc291cmNlTm9kZXMucHVzaChkZXN0aW5hdGlvbk5vZGUpO1xuICAgICAgfVxuICAgICAgYWRqYWNlbnRMaXN0W3NvdXJjZU5vZGVdLm91dGdvaW5nLnNwbGljZShpLCAxKTtcbiAgICAgIGktLTtcbiAgICB9XG4gICAgb3JkZXJlZE5vZGVzLnB1c2goc291cmNlTm9kZSk7XG4gIH1cbiAgbGV0IGhhc0VkZ2VzID0gZmFsc2U7XG4gIGZvciAoY29uc3Qgbm9kZSBvZiBPYmplY3Qua2V5cyhhZGphY2VudExpc3QpKSB7XG4gICAgY29uc3QgZWRnZXMgPSBhZGphY2VudExpc3Rbbm9kZV07XG4gICAgaWYgKGVkZ2VzLmluY29taW5nICE9PSAwKSB7XG4gICAgICBoYXNFZGdlcyA9IHRydWU7XG4gICAgfVxuICB9XG4gIGlmIChoYXNFZGdlcykge1xuICAgIHJldHVybiBudWxsO1xuICB9IGVsc2Uge1xuICAgIHJldHVybiBvcmRlcmVkTm9kZXM7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.module.js b/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.module.js index 993255a..00ef1f4 100644 --- a/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.module.js +++ b/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.module.js @@ -4,13 +4,45 @@ */ import { NgModule } from '@angular/core'; import { NgxFlowchartComponent } from './ngx-flowchart.component'; +import { FcModelValidationService } from './modelvalidation.service'; +import { FcEdgeDrawingService } from './edge-drawing.service'; +import { CommonModule } from '@angular/common'; +import { FcMagnetDirective } from './magnet.directive'; +import { FcConnectorDirective } from './connector.directive'; +import { FcNodeContainerComponent } from './node.component'; +import { FC_NODE_COMPONENT_CONFIG } from './ngx-flowchart.models'; +import { DefaultFcNodeComponent } from './default-node.component'; +const ɵ0 = { + nodeComponentType: DefaultFcNodeComponent +}; export class NgxFlowchartModule { } NgxFlowchartModule.decorators = [ { type: NgModule, args: [{ - declarations: [NgxFlowchartComponent], - imports: [], - exports: [NgxFlowchartComponent] + entryComponents: [ + DefaultFcNodeComponent + ], + declarations: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + FcNodeContainerComponent, + DefaultFcNodeComponent], + providers: [ + FcModelValidationService, + FcEdgeDrawingService, + { + provide: FC_NODE_COMPONENT_CONFIG, + useValue: ɵ0 + } + ], + imports: [ + CommonModule + ], + exports: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + DefaultFcNodeComponent] },] } ]; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25neC1mbG93Y2hhcnQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBUWxFLE1BQU0sT0FBTyxrQkFBa0I7OztZQU45QixRQUFRLFNBQUM7Z0JBQ1IsWUFBWSxFQUFFLENBQUMscUJBQXFCLENBQUM7Z0JBQ3JDLE9BQU8sRUFBRSxFQUNSO2dCQUNELE9BQU8sRUFBRSxDQUFDLHFCQUFxQixDQUFDO2FBQ2pDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IE5neEZsb3djaGFydENvbXBvbmVudCB9IGZyb20gJy4vbmd4LW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mNNYWduZXREaXJlY3RpdmUsXG4gICAgRmNDb25uZWN0b3JEaXJlY3RpdmUsXG4gICAgRGVmYXVsdEZjTm9kZUNvbXBvbmVudF1cbn0pXG5leHBvcnQgY2xhc3MgTmd4Rmxvd2NoYXJ0TW9kdWxlIHsgfVxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.service.js b/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.service.js deleted file mode 100644 index a440e61..0000000 --- a/dist/ngx-flowchart/esm2015/lib/ngx-flowchart.service.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @fileoverview added by tsickle - * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc - */ -import { Injectable } from '@angular/core'; -import * as i0 from "@angular/core"; -export class NgxFlowchartService { - constructor() { } -} -NgxFlowchartService.decorators = [ - { type: Injectable, args: [{ - providedIn: 'root' - },] } -]; -/** @nocollapse */ -NgxFlowchartService.ctorParameters = () => []; -/** @nocollapse */ NgxFlowchartService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function NgxFlowchartService_Factory() { return new NgxFlowchartService(); }, token: NgxFlowchartService, providedIn: "root" }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZsb3djaGFydC8iLCJzb3VyY2VzIjpbImxpYi9uZ3gtZmxvd2NoYXJ0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBSzNDLE1BQU0sT0FBTyxtQkFBbUI7SUFFOUIsZ0JBQWdCLENBQUM7OztZQUxsQixVQUFVLFNBQUM7Z0JBQ1YsVUFBVSxFQUFFLE1BQU07YUFDbkIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBJbmplY3RhYmxlKHtcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnXG59KVxuZXhwb3J0IGNsYXNzIE5neEZsb3djaGFydFNlcnZpY2Uge1xuXG4gIGNvbnN0cnVjdG9yKCkgeyB9XG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/node-dragging.service.js b/dist/ngx-flowchart/esm2015/lib/node-dragging.service.js new file mode 100644 index 0000000..75e748e --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/node-dragging.service.js @@ -0,0 +1,466 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { FlowchartConstants } from './ngx-flowchart.models'; +/** @type {?} */ +const nodeDropScope = { + dropElement: null +}; +export class FcNodeDraggingService { + /** + * @param {?} modelService + * @param {?} applyFunction + * @param {?} automaticResize + * @param {?} dragAnimation + */ + constructor(modelService, applyFunction, automaticResize, dragAnimation) { + this.nodeDraggingScope = { + shadowDragStarted: false, + dropElement: null, + draggedNodes: [], + shadowElements: [] + }; + this.dragOffsets = []; + this.draggedElements = []; + this.destinationHtmlElements = []; + this.oldDisplayStyles = []; + this.modelService = modelService; + this.automaticResize = automaticResize; + this.dragAnimation = dragAnimation; + this.applyFunction = applyFunction; + } + /** + * @private + * @param {?} coordinate + * @param {?} max + * @return {?} + */ + getCoordinate(coordinate, max) { + coordinate = Math.max(coordinate, 0); + coordinate = Math.min(coordinate, max); + return coordinate; + } + /** + * @private + * @param {?} x + * @return {?} + */ + getXCoordinate(x) { + return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth); + } + /** + * @private + * @param {?} y + * @return {?} + */ + getYCoordinate(y) { + return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight); + } + /** + * @private + * @param {?} draggedNode + * @param {?} nodeElement + * @return {?} + */ + resizeCanvas(draggedNode, nodeElement) { + if (this.automaticResize && !this.modelService.isDropSource()) { + /** @type {?} */ + const canvasElement = this.modelService.canvasHtmlElement; + if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px'; + } + if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px'; + } + } + } + /** + * @param {?} node + * @return {?} + */ + isDraggingNode(node) { + return this.nodeDraggingScope.draggedNodes.includes(node); + } + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + dragstart(event, node) { + if (node.readonly) { + return; + } + this.dragOffsets.length = 0; + this.draggedElements.length = 0; + this.nodeDraggingScope.draggedNodes.length = 0; + this.nodeDraggingScope.shadowElements.length = 0; + this.destinationHtmlElements.length = 0; + this.oldDisplayStyles.length = 0; + /** @type {?} */ + const elements = []; + /** @type {?} */ + const nodes = []; + if (this.modelService.nodes.isSelected(node)) { + /** @type {?} */ + const selectedNodes = this.modelService.nodes.getSelectedNodes(); + for (const selectedNode of selectedNodes) { + /** @type {?} */ + const element = $(this.modelService.nodes.getHtmlElement(selectedNode.id)); + elements.push(element); + nodes.push(selectedNode); + } + } + else { + elements.push($((/** @type {?} */ (event.target)))); + nodes.push(node); + } + /** @type {?} */ + const offsetsX = []; + /** @type {?} */ + const offsetsY = []; + for (const element of elements) { + offsetsX.push(parseInt(element.css('left'), 10) - event.clientX); + offsetsY.push(parseInt(element.css('top'), 10) - event.clientY); + } + /** @type {?} */ + const originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + if (this.modelService.isDropSource()) { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + nodeDropScope.dropElement = (/** @type {?} */ (elements[0][0].cloneNode(true))); + /** @type {?} */ + const offset = $(this.modelService.canvasHtmlElement).offset(); + nodeDropScope.dropElement.offsetInfo = { + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + nodeDropScope.dropElement.style.position = 'absolute'; + nodeDropScope.dropElement.style.pointerEvents = 'none'; + nodeDropScope.dropElement.style.zIndex = '9999'; + document.body.appendChild(nodeDropScope.dropElement); + /** @type {?} */ + const dropNodeInfo = { + node, + dropTargetId: this.modelService.dropTargetId, + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo)); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + /** @type {?} */ + const target = (/** @type {?} */ (event.target)); + this.destinationHtmlElements.push(target); + this.oldDisplayStyles.push(target.style.display); + target.style.display = 'none'; + this.nodeDraggingScope.shadowDragStarted = true; + } + return; + } + this.nodeDraggingScope.draggedNodes = nodes; + for (let i = 0; i < elements.length; i++) { + this.draggedElements.push(elements[i][0]); + this.dragOffsets.push({ + x: offsetsX[i], + y: offsetsY[i] + }); + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + for (let i = 0; i < this.draggedElements.length; i++) { + /** @type {?} */ + const dragOffset = this.dragOffsets[i]; + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const shadowElement = $(`
` + + `

${draggedNode.name}

`); + /** @type {?} */ + const targetInnerNode = $(this.draggedElements[i]).children()[0]; + shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor; + this.nodeDraggingScope.shadowElements.push(shadowElement); + this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]); + } + } + originalEvent.dataTransfer.setData('text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + for (let i = 0; i < this.draggedElements.length; i++) { + this.destinationHtmlElements.push(this.draggedElements[i]); + this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); + this.destinationHtmlElements[i].style.display = 'none'; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.nodeDraggingScope.shadowDragStarted = true; + } + } + } + /** + * @param {?} event + * @return {?} + */ + drop(event) { + if (this.modelService.isDropSource()) { + event.preventDefault(); + return false; + } + /** @type {?} */ + let dropNode = null; + /** @type {?} */ + const originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + /** @type {?} */ + const infoText = originalEvent.dataTransfer.getData('text'); + if (infoText) { + /** @type {?} */ + let dropNodeInfo = null; + try { + dropNodeInfo = JSON.parse(infoText); + } + catch (e) { } + if (dropNodeInfo && dropNodeInfo.dropTargetId) { + if (this.modelService.canvasHtmlElement.id && + this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) { + dropNode = dropNodeInfo.node; + /** @type {?} */ + const offset = $(this.modelService.canvasHtmlElement).offset(); + /** @type {?} */ + const x = event.clientX - offset.left; + /** @type {?} */ + const y = event.clientY - offset.top; + dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x)); + dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y)); + } + } + } + if (dropNode) { + this.modelService.dropNode(event, dropNode); + event.preventDefault(); + return false; + } + else if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + () => { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const dragOffset = this.dragOffsets[i]; + draggedNode.x = Math.round(this.getXCoordinate(dragOffset.x + event.clientX)); + draggedNode.y = Math.round(this.getYCoordinate(dragOffset.y + event.clientY)); + } + event.preventDefault(); + return false; + })); + } + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + if (nodeDropScope.dropElement) { + /** @type {?} */ + const offsetInfo = nodeDropScope.dropElement.offsetInfo; + nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px'; + nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px'; + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + () => { + this.destinationHtmlElements[0].style.display = this.oldDisplayStyles[0]; + this.nodeDraggingScope.shadowDragStarted = false; + })); + } + event.preventDefault(); + return; + } + if (this.modelService.isDropSource()) { + event.preventDefault(); + return; + } + if (!this.nodeDraggingScope.draggedNodes.length) { + event.preventDefault(); + return; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + () => { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const dragOffset = this.dragOffsets[i]; + draggedNode.x = this.getXCoordinate(dragOffset.x + event.clientX); + draggedNode.y = this.getYCoordinate(dragOffset.y + event.clientY); + this.resizeCanvas(draggedNode, this.draggedElements[i]); + } + event.preventDefault(); + return false; + })); + } + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.nodeDraggingScope.draggedNodes.length) { + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + () => { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + this.destinationHtmlElements[i].style.display = this.oldDisplayStyles[i]; + } + this.nodeDraggingScope.shadowDragStarted = false; + })); + } + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const dragOffset = this.dragOffsets[i]; + this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px'); + this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px'); + this.resizeCanvas(draggedNode, this.draggedElements[i]); + } + event.preventDefault(); + } + } + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + this.applyFunction((/** + * @return {?} + */ + () => { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + if (this.modelService.isDropSource()) { + return; + } + if (this.nodeDraggingScope.shadowElements.length) { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const shadowElement = this.nodeDraggingScope.shadowElements[i]; + draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10); + draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10); + this.modelService.canvasHtmlElement.removeChild(shadowElement[0]); + } + this.nodeDraggingScope.shadowElements.length = 0; + } + if (this.nodeDraggingScope.draggedNodes.length) { + this.nodeDraggingScope.draggedNodes.length = 0; + this.draggedElements.length = 0; + this.dragOffsets.length = 0; + } + })); + } +} +if (false) { + /** @type {?} */ + FcNodeDraggingService.prototype.nodeDraggingScope; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragOffsets; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.draggedElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.destinationHtmlElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.oldDisplayStyles; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.automaticResize; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.applyFunction; +} +/** + * @record + */ +export function NodeDraggingScope() { } +if (false) { + /** @type {?} */ + NodeDraggingScope.prototype.draggedNodes; + /** @type {?} */ + NodeDraggingScope.prototype.shadowElements; + /** @type {?} */ + NodeDraggingScope.prototype.shadowDragStarted; + /** @type {?} */ + NodeDraggingScope.prototype.dropElement; +} +/** + * @record + */ +export function NodeDropElement() { } +if (false) { + /** @type {?|undefined} */ + NodeDropElement.prototype.offsetInfo; +} +/** + * @record + */ +export function NodeDropScope() { } +if (false) { + /** @type {?} */ + NodeDropScope.prototype.dropElement; +} +/** + * @record + */ +export function DropNodeInfo() { } +if (false) { + /** @type {?} */ + DropNodeInfo.prototype.node; + /** @type {?} */ + DropNodeInfo.prototype.dropTargetId; + /** @type {?} */ + DropNodeInfo.prototype.offsetX; + /** @type {?} */ + DropNodeInfo.prototype.offsetY; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS1kcmFnZ2luZy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZsb3djaGFydC8iLCJzb3VyY2VzIjpbImxpYi9ub2RlLWRyYWdnaW5nLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUNBLE9BQU8sRUFBb0Isa0JBQWtCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQzs7TUFFeEUsYUFBYSxHQUFrQjtJQUNuQyxXQUFXLEVBQUUsSUFBSTtDQUNsQjtBQUVELE1BQU0sT0FBTyxxQkFBcUI7Ozs7Ozs7SUFvQmhDLFlBQVksWUFBNEIsRUFDNUIsYUFBa0QsRUFDbEQsZUFBd0IsRUFBRSxhQUFxQjtRQXBCM0Qsc0JBQWlCLEdBQXNCO1lBQ3JDLGlCQUFpQixFQUFFLEtBQUs7WUFDeEIsV0FBVyxFQUFFLElBQUk7WUFDakIsWUFBWSxFQUFFLEVBQUU7WUFDaEIsY0FBYyxFQUFFLEVBQUU7U0FDbkIsQ0FBQztRQUVNLGdCQUFXLEdBQWU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bmd0aCA9IDA7XG4gICAgICAgIHRoaXMuZHJhZ2dlZEVsZW1lbnRzLmxlbmd0aCA9IDA7XG4gICAgICAgIHRoaXMuZHJhZ09mZnNldHMubGVuZ3RoID0gMDtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxuXG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgTm9kZURyYWdnaW5nU2NvcGUge1xuICBkcmFnZ2VkTm9kZXM6IEFycmF5PEZjTm9kZT47XG4gIHNoYWRvd0VsZW1lbnRzOiBBcnJheTxKUXVlcnk8SFRNTEVsZW1lbnQ+PjtcbiAgc2hhZG93RHJhZ1N0YXJ0ZWQ6IGJvb2xlYW47XG4gIGRyb3BFbGVtZW50OiBIVE1MRWxlbWVudDtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBOb2RlRHJvcEVsZW1lbnQgZXh0ZW5kcyBIVE1MRWxlbWVudCB7XG4gIG9mZnNldEluZm8/OiB7XG4gICAgb2Zmc2V0WDogbnVtYmVyO1xuICAgIG9mZnNldFk6IG51bWJlcjtcbiAgfTtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBOb2RlRHJvcFNjb3BlIHtcbiAgZHJvcEVsZW1lbnQ6IE5vZGVEcm9wRWxlbWVudDtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBEcm9wTm9kZUluZm8ge1xuICBub2RlOiBGY05vZGU7XG4gIGRyb3BUYXJnZXRJZDogc3RyaW5nO1xuICBvZmZzZXRYOiBudW1iZXI7XG4gIG9mZnNldFk6IG51bWJlcjtcbn1cbiJdfQ== \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/node.component.js b/dist/ngx-flowchart/esm2015/lib/node.component.js new file mode 100644 index 0000000..919adc2 --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/node.component.js @@ -0,0 +1,315 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { Component, ComponentFactoryResolver, ElementRef, HostBinding, HostListener, Inject, Input, ViewChild, ViewContainerRef } from '@angular/core'; +import { FC_NODE_COMPONENT_CONFIG, FlowchartConstants } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +export class FcNodeContainerComponent { + /** + * @param {?} nodeComponentConfig + * @param {?} elementRef + * @param {?} componentFactoryResolver + */ + constructor(nodeComponentConfig, elementRef, componentFactoryResolver) { + this.nodeComponentConfig = nodeComponentConfig; + this.elementRef = elementRef; + this.componentFactoryResolver = componentFactoryResolver; + } + /** + * @return {?} + */ + get nodeId() { + return this.node.id; + } + /** + * @return {?} + */ + get top() { + return this.node.y + 'px'; + } + /** + * @return {?} + */ + get left() { + return this.node.x + 'px'; + } + /** + * @return {?} + */ + ngOnInit() { + if (!this.userNodeCallbacks) { + this.userNodeCallbacks = {}; + } + this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || ((/** + * @return {?} + */ + () => { })); + this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || ((/** + * @return {?} + */ + () => { })); + this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || ((/** + * @return {?} + */ + () => { })); + this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || ((/** + * @return {?} + */ + () => { })); + this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || ((/** + * @return {?} + */ + () => { })); + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.nodeClass); + if (!this.node.readonly) { + element.attr('draggable', 'true'); + } + this.updateNodeClass(); + this.modelservice.nodes.setHtmlElement(this.node.id, element[0]); + this.nodeContentContainer.clear(); + /** @type {?} */ + const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType); + /** @type {?} */ + const componentRef = this.nodeContentContainer.createComponent(componentFactory); + this.nodeComponent = componentRef.instance; + this.nodeComponent.callbacks = this.callbacks; + this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks; + this.nodeComponent.node = this.node; + this.nodeComponent.modelservice = this.modelservice; + this.updateNodeComponent(); + } + /** + * @param {?} changes + * @return {?} + */ + ngOnChanges(changes) { + /** @type {?} */ + let updateNode = false; + for (const propName of Object.keys(changes)) { + /** @type {?} */ + const change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) { + updateNode = true; + } + } + } + if (updateNode) { + this.updateNodeClass(); + this.updateNodeComponent(); + } + } + /** + * @private + * @return {?} + */ + updateNodeClass() { + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + this.toggleClass(element, FlowchartConstants.selectedClass, this.selected); + this.toggleClass(element, FlowchartConstants.editClass, this.edit); + this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse); + this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging); + } + /** + * @private + * @return {?} + */ + updateNodeComponent() { + this.nodeComponent.selected = this.selected; + this.nodeComponent.edit = this.edit; + this.nodeComponent.underMouse = this.underMouse; + this.nodeComponent.mouseOverConnector = this.mouseOverConnector; + this.nodeComponent.dragging = this.dragging; + } + /** + * @private + * @param {?} element + * @param {?} clazz + * @param {?} set + * @return {?} + */ + toggleClass(element, clazz, set) { + if (set) { + element.addClass(clazz); + } + else { + element.removeClass(clazz); + } + } + /** + * @param {?} event + * @return {?} + */ + mousedown(event) { + event.stopPropagation(); + } + /** + * @param {?} event + * @return {?} + */ + dragstart(event) { + if (!this.node.readonly) { + this.callbacks.nodeDragstart(event, this.node); + } + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + if (!this.node.readonly) { + this.callbacks.nodeDragend(event); + } + } + /** + * @param {?} event + * @return {?} + */ + click(event) { + if (!this.node.readonly) { + this.callbacks.nodeClicked(event, this.node); + } + } + /** + * @param {?} event + * @return {?} + */ + mouseover(event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOver(event, this.node); + } + } + /** + * @param {?} event + * @return {?} + */ + mouseout(event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOut(event, this.node); + } + } +} +FcNodeContainerComponent.decorators = [ + { type: Component, args: [{ + selector: 'fc-node', + template: '', + styles: [":host{position:absolute;z-index:1}:host.fc-dragging{z-index:10}:host ::ng-deep .fc-leftConnectors,:host ::ng-deep .fc-rightConnectors{position:absolute;top:0;height:100%;display:flex;flex-direction:column;z-index:-10}:host ::ng-deep .fc-leftConnectors .fc-magnet,:host ::ng-deep .fc-rightConnectors .fc-magnet{align-items:center}:host ::ng-deep .fc-leftConnectors{left:-20px}:host ::ng-deep .fc-rightConnectors{right:-20px}:host ::ng-deep .fc-magnet{display:flex;flex-grow:1;height:60px;justify-content:center}:host ::ng-deep .fc-connector{width:18px;height:18px;border:10px solid transparent;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box;border-radius:50%;background-color:#f7a789;color:#fff;pointer-events:all}:host ::ng-deep .fc-connector.fc-hover{background-color:#000}"] + }] } +]; +/** @nocollapse */ +FcNodeContainerComponent.ctorParameters = () => [ + { type: undefined, decorators: [{ type: Inject, args: [FC_NODE_COMPONENT_CONFIG,] }] }, + { type: ElementRef }, + { type: ComponentFactoryResolver } +]; +FcNodeContainerComponent.propDecorators = { + callbacks: [{ type: Input }], + userNodeCallbacks: [{ type: Input }], + node: [{ type: Input }], + selected: [{ type: Input }], + edit: [{ type: Input }], + underMouse: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + modelservice: [{ type: Input }], + dragging: [{ type: Input }], + nodeId: [{ type: HostBinding, args: ['attr.id',] }], + top: [{ type: HostBinding, args: ['style.top',] }], + left: [{ type: HostBinding, args: ['style.left',] }], + nodeContentContainer: [{ type: ViewChild, args: ['nodeContent', { read: ViewContainerRef, static: true },] }], + mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }], + dragstart: [{ type: HostListener, args: ['dragstart', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }], + click: [{ type: HostListener, args: ['click', ['$event'],] }], + mouseover: [{ type: HostListener, args: ['mouseover', ['$event'],] }], + mouseout: [{ type: HostListener, args: ['mouseout', ['$event'],] }] +}; +if (false) { + /** @type {?} */ + FcNodeContainerComponent.prototype.callbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.node; + /** @type {?} */ + FcNodeContainerComponent.prototype.selected; + /** @type {?} */ + FcNodeContainerComponent.prototype.edit; + /** @type {?} */ + FcNodeContainerComponent.prototype.underMouse; + /** @type {?} */ + FcNodeContainerComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeContainerComponent.prototype.modelservice; + /** @type {?} */ + FcNodeContainerComponent.prototype.dragging; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeComponent; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeContentContainer; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.nodeComponentConfig; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.componentFactoryResolver; +} +/** + * @abstract + */ +export class FcNodeComponent { + constructor() { + this.flowchartConstants = FlowchartConstants; + } + /** + * @return {?} + */ + ngOnInit() { + } +} +FcNodeComponent.propDecorators = { + callbacks: [{ type: Input }], + userNodeCallbacks: [{ type: Input }], + node: [{ type: Input }], + selected: [{ type: Input }], + edit: [{ type: Input }], + underMouse: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + modelservice: [{ type: Input }], + dragging: [{ type: Input }] +}; +if (false) { + /** @type {?} */ + FcNodeComponent.prototype.callbacks; + /** @type {?} */ + FcNodeComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeComponent.prototype.node; + /** @type {?} */ + FcNodeComponent.prototype.selected; + /** @type {?} */ + FcNodeComponent.prototype.edit; + /** @type {?} */ + FcNodeComponent.prototype.underMouse; + /** @type {?} */ + FcNodeComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeComponent.prototype.modelservice; + /** @type {?} */ + FcNodeComponent.prototype.dragging; + /** @type {?} */ + FcNodeComponent.prototype.flowchartConstants; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25vZGUuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUNULHdCQUF3QixFQUN4QixVQUFVLEVBQUUsV0FBVyxFQUN2QixZQUFZLEVBQ1osTUFBTSxFQUNOLEtBQUssRUFJTCxTQUFTLEVBQ1QsZ0JBQWdCLEVBQ2pCLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFDTCx3QkFBd0IsRUFLeEIsa0JBQWtCLEVBRW5CLE1BQU0sd0JBQXdCLENBQUM7QUFDaEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBT2pELE1BQU0sT0FBTyx3QkFBd0I7Ozs7OztJQWdEbkMsWUFBc0QsbUJBQTBDLEVBQzVFLFVBQW1DLEVBQ25DLHdCQUFrRDtRQUZoQix3QkFBbUIsR0FBbkIsbUJBQW1CLENBQXVCO1FBQzVFLGVBQVUsR0FBVixVQUFVLENBQXlCO1FBQ25DLDZCQUF3QixHQUF4Qix3QkFBd0IsQ0FBMEI7SUFDdEUsQ0FBQzs7OztJQXRCRCxJQUNJLE1BQU07UUFDUixPQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDO0lBQ3RCLENBQUM7Ozs7SUFFRCxJQUNJLEdBQUc7UUFDTCxPQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLElBQUksQ0FBQztJQUM1QixDQUFDOzs7O0lBRUQsSUFDSSxJ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YWxsYmFja3Mubm9kZU1vdXNlT3V0KGV2ZW50LCB0aGlzLm5vZGUpO1xuICAgIH1cbiAgfVxuXG59XG5cbmV4cG9ydCBhYnN0cmFjdCBjbGFzcyBGY05vZGVDb21wb25lbnQgaW1wbGVtZW50cyBPbkluaXQge1xuXG4gIEBJbnB1dCgpXG4gIGNhbGxiYWNrczogRmNDYWxsYmFja3M7XG5cbiAgQElucHV0KClcbiAgdXNlck5vZGVDYWxsYmFja3M6IFVzZXJOb2RlQ2FsbGJhY2tzO1xuXG4gIEBJbnB1dCgpXG4gIG5vZGU6IEZjTm9kZTtcblxuICBASW5wdXQoKVxuICBzZWxlY3RlZDogYm9vbGVhbjtcblxuICBASW5wdXQoKVxuICBlZGl0OiBib29sZWFuO1xuXG4gIEBJbnB1dCgpXG4gIHVuZGVyTW91c2U6IGJvb2xlYW47XG5cbiAgQElucHV0KClcbiAgbW91c2VPdmVyQ29ubmVjdG9yOiBGY0Nvbm5lY3RvcjtcblxuICBASW5wdXQoKVxuICBtb2RlbHNlcnZpY2U6IEZjTW9kZWxTZXJ2aWNlO1xuXG4gIEBJbnB1dCgpXG4gIGRyYWdnaW5nOiBib29sZWFuO1xuXG4gIGZsb3djaGFydENvbnN0YW50cyA9IEZsb3djaGFydENvbnN0YW50cztcblxuICBuZ09uSW5pdCgpOiB2b2lkIHtcbiAgfVxuXG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/rectangleselect.service.js b/dist/ngx-flowchart/esm2015/lib/rectangleselect.service.js new file mode 100644 index 0000000..1542f1c --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/rectangleselect.service.js @@ -0,0 +1,193 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import scrollparent from './scrollparent'; +/** + * @record + */ +function Rectangle() { } +if (false) { + /** @type {?} */ + Rectangle.prototype.x1; + /** @type {?} */ + Rectangle.prototype.x2; + /** @type {?} */ + Rectangle.prototype.y1; + /** @type {?} */ + Rectangle.prototype.y2; +} +export class FcRectangleSelectService { + /** + * @param {?} modelService + * @param {?} selectElement + * @param {?} applyFunction + */ + constructor(modelService, selectElement, applyFunction) { + this.selectRect = { + x1: 0, + x2: 0, + y1: 0, + y2: 0 + }; + this.modelService = modelService; + this.selectElement = selectElement; + this.$canvasElement = $(this.modelService.canvasHtmlElement); + this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement)); + this.applyFunction = applyFunction; + } + /** + * @param {?} e + * @return {?} + */ + mousedown(e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && this.selectElement.hidden) { + this.selectElement.hidden = false; + /** @type {?} */ + const offset = this.$canvasElement.offset(); + this.selectRect.x1 = Math.round(e.pageX - offset.left); + this.selectRect.y1 = Math.round(e.pageY - offset.top); + this.selectRect.x2 = this.selectRect.x1; + this.selectRect.y2 = this.selectRect.y1; + this.updateSelectRect(); + } + } + /** + * @param {?} e + * @return {?} + */ + mousemove(e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + const offset = this.$canvasElement.offset(); + this.selectRect.x2 = Math.round(e.pageX - offset.left); + this.selectRect.y2 = Math.round(e.pageY - offset.top); + this.updateScroll(offset); + this.updateSelectRect(); + } + } + /** + * @private + * @param {?} offset + * @return {?} + */ + updateScroll(offset) { + /** @type {?} */ + const rect = this.$scrollParent[0].getBoundingClientRect(); + /** @type {?} */ + const bottom = rect.bottom - offset.top; + /** @type {?} */ + const right = rect.right - offset.left; + /** @type {?} */ + const top = rect.top - offset.top; + /** @type {?} */ + const left = rect.left - offset.left; + if (this.selectRect.y2 - top < 25) { + /** @type {?} */ + const topScroll = 25 - (this.selectRect.y2 - top); + /** @type {?} */ + const scroll = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll - topScroll); + } + else if (bottom - this.selectRect.y2 < 40) { + /** @type {?} */ + const bottomScroll = 40 - (bottom - this.selectRect.y2); + /** @type {?} */ + const scroll = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll + bottomScroll); + } + if (this.selectRect.x2 - left < 25) { + /** @type {?} */ + const leftScroll = 25 - (this.selectRect.x2 - left); + /** @type {?} */ + const scroll = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll - leftScroll); + } + else if (right - this.selectRect.x2 < 40) { + /** @type {?} */ + const rightScroll = 40 - (right - this.selectRect.x2); + /** @type {?} */ + const scroll = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll + rightScroll); + } + } + /** + * @param {?} e + * @return {?} + */ + mouseup(e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + const rectBox = (/** @type {?} */ (this.selectElement.getBoundingClientRect())); + this.selectElement.hidden = true; + this.selectObjects(rectBox); + } + } + /** + * @private + * @return {?} + */ + updateSelectRect() { + /** @type {?} */ + const x3 = Math.min(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + const x4 = Math.max(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + const y3 = Math.min(this.selectRect.y1, this.selectRect.y2); + /** @type {?} */ + const y4 = Math.max(this.selectRect.y1, this.selectRect.y2); + this.selectElement.style.left = x3 + 'px'; + this.selectElement.style.top = y3 + 'px'; + this.selectElement.style.width = x4 - x3 + 'px'; + this.selectElement.style.height = y4 - y3 + 'px'; + } + /** + * @private + * @param {?} rectBox + * @return {?} + */ + selectObjects(rectBox) { + this.applyFunction((/** + * @return {?} + */ + () => { + this.modelService.selectAllInRect(rectBox); + })); + } +} +if (false) { + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectRect; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$canvasElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$scrollParent; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.applyFunction; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjdGFuZ2xlc2VsZWN0LnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL3JlY3RhbmdsZXNlbGVjdC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFFQSxPQUFPLFlBQVksTUFBTSxnQkFBZ0IsQ0FBQzs7OztBQUUxQyx3QkFLQzs7O0lBSkMsdUJBQVc7O0lBQ1gsdUJBQVc7O0lBQ1gsdUJBQVc7O0lBQ1gsdUJBQVc7O0FBR2IsTUFBTSxPQUFPLHdCQUF3Qjs7Ozs7O0lBZW5DLFlBQVksWUFBNEIsRUFDNUIsYUFBMEIsRUFDMUIsYUFBa0Q7UUFmN0MsZUFBVSxHQUFjO1lBQ3ZDLEVBQUUsRUFBRSxDQUFDO1lBQ0wsRUFBRSxFQUFFLENBQUM7WUFDTCxFQUFFLEVBQUUsQ0FBQztZQUNMLEVBQUUsRUFBRSxDQUFDO1NBQ04sQ0FBQztRQVdBLElBQUksQ0FBQyxZQUFZLEdBQUcsWUFBWSxDQUFDO1FBQ2pDLElBQUksQ0FBQyxhQUFhLEdBQUcsYUFBYSxDQUFDO1FBQ25DLElBQUksQ0FBQyxjQUFjLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsaUJBQWlCLENBQUMsQ0FBQztRQUM3RCxJQUFJLENBQUMsYUFBYSxHQUFHLENBQUMsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDLENBQUM7UUFDMUUsSUFBSSxDQUFDLGFBQWEsR0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hcHBseUZ1bmN0aW9uKCgpID0+IHtcbiAgICAgIHRoaXMubW9kZWxTZXJ2aWNlLnNlbGVjdEFsbEluUmVjdChyZWN0Qm94KTtcbiAgICB9KTtcbiAgfVxuXG59XG5cbiJdfQ== \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/lib/scrollparent.js b/dist/ngx-flowchart/esm2015/lib/scrollparent.js new file mode 100644 index 0000000..d703790 --- /dev/null +++ b/dist/ngx-flowchart/esm2015/lib/scrollparent.js @@ -0,0 +1,37 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +/** @type {?} */ +const regex = /(auto|scroll)/; +/** @type {?} */ +const style = (/** + * @param {?} node + * @param {?} prop + * @return {?} + */ +(node, prop) => getComputedStyle(node, null).getPropertyValue(prop)); +const ɵ0 = style; +/** @type {?} */ +const scroll = (/** + * @param {?} node + * @return {?} + */ +(node) => regex.test(style(node, 'overflow') + + style(node, 'overflow-y') + + style(node, 'overflow-x'))); +const ɵ1 = scroll; +/** @type {?} */ +const scrollparent = (/** + * @param {?} node + * @return {?} + */ +(node) => !node || node === document.body + ? document.body + : scroll(node) + ? node + : scrollparent((/** @type {?} */ (node.parentNode)))); +const ɵ2 = scrollparent; +export default scrollparent; +export { ɵ0, ɵ1, ɵ2 }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xscGFyZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZsb3djaGFydC8iLCJzb3VyY2VzIjpbImxpYi9zY3JvbGxwYXJlbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7TUFBTSxLQUFLLEdBQUcsZUFBZTs7TUFFdkIsS0FBSzs7Ozs7QUFBRyxDQUFDLElBQWEsRUFBRSxJQUFZLEVBQVUsRUFBRSxDQUNwRCxnQkFBZ0IsQ0FBQyxJQUFJLEV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Y29uc3Qgc2Nyb2xscGFyZW50ID0gKG5vZGU6IEhUTUxFbGVtZW50KTogSFRNTEVsZW1lbnQgPT5cbiAgIW5vZGUgfHwgbm9kZSA9PT0gZG9jdW1lbnQuYm9keVxuICAgID8gZG9jdW1lbnQuYm9keVxuICAgIDogc2Nyb2xsKG5vZGUpXG4gICAgPyBub2RlXG4gICAgOiBzY3JvbGxwYXJlbnQobm9kZS5wYXJlbnROb2RlIGFzIEhUTUxFbGVtZW50KTtcblxuZXhwb3J0IGRlZmF1bHQgc2Nyb2xscGFyZW50O1xuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/ngx-flowchart.js b/dist/ngx-flowchart/esm2015/ngx-flowchart.js index 05edc6b..57d9d13 100644 --- a/dist/ngx-flowchart/esm2015/ngx-flowchart.js +++ b/dist/ngx-flowchart/esm2015/ngx-flowchart.js @@ -5,5 +5,11 @@ /** * Generated bundle index. Do not edit. */ -export { NgxFlowchartService, NgxFlowchartComponent, NgxFlowchartModule } from './public-api'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJuZ3gtZmxvd2NoYXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSwrRUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0= \ No newline at end of file +export { FcNodeComponent, NgxFlowchartComponent, NgxFlowchartModule, fcTopSort, FC_NODE_COMPONENT_CONFIG, FlowchartConstants, ModelvalidationError } from './public-api'; +export { FcConnectorDirective as ɵf } from './lib/connector.directive'; +export { DefaultFcNodeComponent as ɵd } from './lib/default-node.component'; +export { FcEdgeDrawingService as ɵc } from './lib/edge-drawing.service'; +export { FcMagnetDirective as ɵe } from './lib/magnet.directive'; +export { FcModelValidationService as ɵb } from './lib/modelvalidation.service'; +export { FcNodeContainerComponent as ɵa } from './lib/node.component'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJuZ3gtZmxvd2NoYXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSwwSkFBYyxjQUFjLENBQUM7QUFFN0IsT0FBTyxFQUFDLG9CQUFvQixJQUFJLEVBQUUsRUFBQyxNQUFNLDJCQUEyQixDQUFDO0FBQ3JFLE9BQU8sRUFBQyxzQkFBc0IsSUFBSSxFQUFFLEVBQUMsTUFBTSw4QkFBOEIsQ0FBQztBQUMxRSxPQUFPLEVBQUMsb0JBQW9CLElBQUksRUFBRSxFQUFDLE1BQU0sNEJBQTRCLENBQUM7QUFDdEUsT0FBTyxFQUFDLGlCQUFpQixJQUFJLEVBQUUsRUFBQyxNQUFNLHdCQUF3QixDQUFDO0FBQy9ELE9BQU8sRUFBQyx3QkFBd0IsSUFBSSxFQUFFLEVBQUMsTUFBTSwrQkFBK0IsQ0FBQztBQUM3RSxPQUFPLEVBQUMsd0JBQXdCLElBQUksRUFBRSxFQUFDLE1BQU0sc0JBQXNCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG5cbmV4cG9ydCB7RmNDb25uZWN0b3JEaXJlY3RpdmUgYXMgybVmfSBmcm9tICcuL2xpYi9jb25uZWN0b3IuZGlyZWN0aXZlJztcbmV4cG9ydCB7RGVmYXVsdEZjTm9kZUNvbXBvbmVudCBhcyDJtWR9IGZyb20gJy4vbGliL2RlZmF1bHQtbm9kZS5jb21wb25lbnQnO1xuZXhwb3J0IHtGY0VkZ2VEcmF3aW5nU2VydmljZSBhcyDJtWN9IGZyb20gJy4vbGliL2VkZ2UtZHJhd2luZy5zZXJ2aWNlJztcbmV4cG9ydCB7RmNNYWduZXREaXJlY3RpdmUgYXMgybVlfSBmcm9tICcuL2xpYi9tYWduZXQuZGlyZWN0aXZlJztcbmV4cG9ydCB7RmNNb2RlbFZhbGlkYXRpb25TZXJ2aWNlIGFzIMm1Yn0gZnJvbSAnLi9saWIvbW9kZWx2YWxpZGF0aW9uLnNlcnZpY2UnO1xuZXhwb3J0IHtGY05vZGVDb250YWluZXJDb21wb25lbnQgYXMgybVhfSBmcm9tICcuL2xpYi9ub2RlLmNvbXBvbmVudCc7Il19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm2015/public-api.js b/dist/ngx-flowchart/esm2015/public-api.js index eab613d..bae0376 100644 --- a/dist/ngx-flowchart/esm2015/public-api.js +++ b/dist/ngx-flowchart/esm2015/public-api.js @@ -5,7 +5,8 @@ /* * Public API Surface of ngx-flowchart */ -export { NgxFlowchartService } from './lib/ngx-flowchart.service'; export { NgxFlowchartComponent } from './lib/ngx-flowchart.component'; export { NgxFlowchartModule } from './lib/ngx-flowchart.module'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxvQ0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxzQ0FBYywrQkFBK0IsQ0FBQztBQUM5QyxtQ0FBYyw0QkFBNEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LWZsb3djaGFydFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1mbG93Y2hhcnQuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0Lm1vZHVsZSc7XG4iXX0= \ No newline at end of file +export { fcTopSort, FC_NODE_COMPONENT_CONFIG, FlowchartConstants, ModelvalidationError } from './lib/ngx-flowchart.models'; +export { FcNodeComponent } from './lib/node.component'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxzQ0FBYywrQkFBK0IsQ0FBQztBQUM5QyxtQ0FBYyw0QkFBNEIsQ0FBQztBQUMzQyw4RkFBYyw0QkFBNEIsQ0FBQztBQUMzQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sc0JBQXNCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIG5neC1mbG93Y2hhcnRcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0Lm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0Lm1vZGVscyc7XG5leHBvcnQgeyBGY05vZGVDb21wb25lbnQgfSBmcm9tICcuL2xpYi9ub2RlLmNvbXBvbmVudCc7XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/connector.directive.js b/dist/ngx-flowchart/esm5/lib/connector.directive.js new file mode 100644 index 0000000..8b34d76 --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/connector.directive.js @@ -0,0 +1,198 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import * as tslib_1 from "tslib"; +import { Directive, ElementRef, HostListener, Input } from '@angular/core'; +import { FlowchartConstants } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +var FcConnectorDirective = /** @class */ (function () { + function FcConnectorDirective(elementRef) { + this.elementRef = elementRef; + } + /** + * @return {?} + */ + FcConnectorDirective.prototype.ngOnInit = /** + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.connectorClass); + if (this.modelservice.isEditable()) { + element.attr('draggable', 'true'); + this.updateConnectorClass(); + } + this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]); + }; + /** + * @param {?} changes + * @return {?} + */ + FcConnectorDirective.prototype.ngOnChanges = /** + * @param {?} changes + * @return {?} + */ + function (changes) { + var e_1, _a; + /** @type {?} */ + var updateConnector = false; + try { + for (var _b = tslib_1.__values(Object.keys(changes)), _c = _b.next(); !_c.done; _c = _b.next()) { + var propName = _c.value; + /** @type {?} */ + var change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (propName === 'mouseOverConnector') { + updateConnector = true; + } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (updateConnector && this.modelservice.isEditable()) { + this.updateConnectorClass(); + } + }; + /** + * @private + * @return {?} + */ + FcConnectorDirective.prototype.updateConnectorClass = /** + * @private + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + if (this.connector === this.mouseOverConnector) { + element.addClass(FlowchartConstants.hoverClass); + } + else { + element.removeClass(FlowchartConstants.hoverClass); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + // Skip - conflict with magnet + /* if (this.modelservice.isEditable()) { + return this.callbacks.edgeDragoverConnector(event, this.connector); + }*/ + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + return this.callbacks.edgeDrop(event, this.connector); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragend(event); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.dragstart = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragstart(event, this.connector); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.mouseenter = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseEnter(event, this.connector); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.mouseleave = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseLeave(event, this.connector); + } + }; + FcConnectorDirective.decorators = [ + { type: Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-connector]' + },] } + ]; + /** @nocollapse */ + FcConnectorDirective.ctorParameters = function () { return [ + { type: ElementRef } + ]; }; + FcConnectorDirective.propDecorators = { + callbacks: [{ type: Input }], + modelservice: [{ type: Input }], + connector: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }], + dragstart: [{ type: HostListener, args: ['dragstart', ['$event'],] }], + mouseenter: [{ type: HostListener, args: ['mouseenter', ['$event'],] }], + mouseleave: [{ type: HostListener, args: ['mouseleave', ['$event'],] }] + }; + return FcConnectorDirective; +}()); +export { FcConnectorDirective }; +if (false) { + /** @type {?} */ + FcConnectorDirective.prototype.callbacks; + /** @type {?} */ + FcConnectorDirective.prototype.modelservice; + /** @type {?} */ + FcConnectorDirective.prototype.connector; + /** @type {?} */ + FcConnectorDirective.prototype.mouseOverConnector; + /** @type {?} */ + FcConnectorDirective.prototype.elementRef; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29ubmVjdG9yLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJsaWIvY29ubmVjdG9yLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsVUFBVSxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQW9DLE1BQU0sZUFBZSxDQUFDO0FBQzdHLE9BQU8sRUFBNEIsa0JBQWtCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUN0RixPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFakQ7SUFrQkUsOEJBQW1CLFVBQW1DO1FBQW5DLGVBQVUsR0FBVixVQUFVLENBQXlCO0lBQ3RELENBQUM7Ozs7SUFFRCx1Q0FBUTs7O0lBQVI7O1lBQ1EsT0FBTyxHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLGFBQWEsQ0FBQztRQUNoRCxPQUFPLENBQUMsUUFBUSxDQUFDLGtCQUFrQixDQUFDLGNBQWMsQ0FBQyxDQUFDO1FBQ3BELElBQUksSUFBSSxD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oJ2RyYWdzdGFydCcsIFsnJGV2ZW50J10pXG4gIGRyYWdzdGFydChldmVudDogRHJhZ0V2ZW50KSB7XG4gICAgaWYgKHRoaXMubW9kZWxzZXJ2aWNlLmlzRWRpdGFibGUoKSkge1xuICAgICAgdGhpcy5jYWxsYmFja3MuZWRnZURyYWdzdGFydChldmVudCwgdGhpcy5jb25uZWN0b3IpO1xuICAgIH1cbiAgfVxuXG4gIEBIb3N0TGlzdGVuZXIoJ21vdXNlZW50ZXInLCBbJyRldmVudCddKVxuICBtb3VzZWVudGVyKGV2ZW50OiBNb3VzZUV2ZW50KSB7XG4gICAgaWYgKHRoaXMubW9kZWxzZXJ2aWNlLmlzRWRpdGFibGUoKSkge1xuICAgICAgdGhpcy5jYWxsYmFja3MuY29ubmVjdG9yTW91c2VFbnRlcihldmVudCwgdGhpcy5jb25uZWN0b3IpO1xuICAgIH1cbiAgfVxuXG4gIEBIb3N0TGlzdGVuZXIoJ21vdXNlbGVhdmUnLCBbJyRldmVudCddKVxuICBtb3VzZWxlYXZlKGV2ZW50OiBNb3VzZUV2ZW50KSB7XG4gICAgaWYgKHRoaXMubW9kZWxzZXJ2aWNlLmlzRWRpdGFibGUoKSkge1xuICAgICAgdGhpcy5jYWxsYmFja3MuY29ubmVjdG9yTW91c2VMZWF2ZShldmVudCwgdGhpcy5jb25uZWN0b3IpO1xuICAgIH1cbiAgfVxuXG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/default-node.component.js b/dist/ngx-flowchart/esm5/lib/default-node.component.js new file mode 100644 index 0000000..99758c0 --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/default-node.component.js @@ -0,0 +1,25 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { FcNodeComponent } from './node.component'; +var DefaultFcNodeComponent = /** @class */ (function (_super) { + tslib_1.__extends(DefaultFcNodeComponent, _super); + function DefaultFcNodeComponent() { + return _super.call(this) || this; + } + DefaultFcNodeComponent.decorators = [ + { type: Component, args: [{ + selector: 'fc-default-node', + template: "\n
\n
\n

{{ node.name }}

\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n ×\n
\n\n", + styles: [":host .fc-node-overlay{position:absolute;pointer-events:none;left:0;top:0;right:0;bottom:0;background-color:#000;opacity:0}:host :host-context(.fc-hover) .fc-node-overlay{opacity:.25;transition:opacity .2s}:host :host-context(.fc-selected) .fc-node-overlay{opacity:.25}:host .innerNode{display:flex;justify-content:center;align-items:center;min-width:100px;border-radius:5px;background-color:#f15b26;color:#fff;font-size:16px;pointer-events:none}:host .innerNode p{padding:0 15px;text-align:center}"] + }] } + ]; + /** @nocollapse */ + DefaultFcNodeComponent.ctorParameters = function () { return []; }; + return DefaultFcNodeComponent; +}(FcNodeComponent)); +export { DefaultFcNodeComponent }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdC1ub2RlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJsaWIvZGVmYXVsdC1ub2RlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUMsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRW5EO0lBSzRDLGtEQUFlO0lBRXpEO2VBQ0UsaUJBQU87SUFDVCxDQUFDOztnQkFURixTQUFTLFNBQUM7b0JBQ1QsUUFBUSxFQUFFLGlCQUFpQjtvQkFDM0IsOGhEQUE0Qzs7aUJBRTdDOzs7O0lBT0QsNkJBQUM7Q0FBQSxBQVhELENBSzRDLGVBQWUsR0FNMUQ7U0FOWSxzQkFBc0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IEZjTm9kZUNvbXBvbmVudCB9IGZyb20gJy4vbm9kZS5jb21wb25lbnQnO1xuXG5AQ29tcG9uZW50KHtcbiAgc2VsZWN0b3I6ICdmYy1kZWZhdWx0LW5vZGUnLFxuICB0ZW1wbGF0ZVVybDogJy4vZGVmYXVsdC1ub2RlLmNvbXBvbmVudC5odG1sJyxcbiAgc3R5bGVVcmxzOiBbJy4vZGVmYXVsdC1ub2RlLmNvbXBvbmVudC5zY3NzJ11cbn0pXG5leHBvcnQgY2xhc3MgRGVmYXVsdEZjTm9kZUNvbXBvbmVudCBleHRlbmRzIEZjTm9kZUNvbXBvbmVudCB7XG5cbiAgY29uc3RydWN0b3IoKSB7XG4gICAgc3VwZXIoKTtcbiAgfVxuXG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/edge-dragging.service.js b/dist/ngx-flowchart/esm5/lib/edge-dragging.service.js new file mode 100644 index 0000000..e1a1213 --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/edge-dragging.service.js @@ -0,0 +1,436 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import * as tslib_1 from "tslib"; +import { FlowchartConstants, ModelvalidationError } from './ngx-flowchart.models'; +var FcEdgeDraggingService = /** @class */ (function () { + function FcEdgeDraggingService(modelValidation, edgeDrawingService, modelService, model, isValidEdgeCallback, applyFunction, dragAnimation, edgeStyle) { + this.edgeDragging = { + isDragging: false, + dragPoint1: null, + dragPoint2: null, + shadowDragStarted: false + }; + this.draggedEdgeSource = null; + this.dragOffset = {}; + this.destinationHtmlElement = null; + this.oldDisplayStyle = ''; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.modelService = modelService; + this.model = model; + this.isValidEdgeCallback = isValidEdgeCallback || ((/** + * @return {?} + */ + function () { return true; })); + this.applyFunction = applyFunction; + this.dragAnimation = dragAnimation; + this.edgeStyle = edgeStyle; + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcEdgeDraggingService.prototype.dragstart = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var e_1, _a; + var _this = this; + /** @type {?} */ + var swapConnector; + /** @type {?} */ + var dragLabel; + /** @type {?} */ + var prevEdge; + if (connector.type === FlowchartConstants.leftConnectorType) { + var _loop_1 = function (edge) { + if (edge === connector.id) { + swapConnector = this_1.modelService.connectors.getConnector(edge.source); + dragLabel = edge.label; + prevEdge = edge; + this_1.applyFunction((/** + * @return {?} + */ + function () { + _this.modelService.edges.delete(edge); + })); + return "break"; + } + }; + var this_1 = this; + try { + for (var _b = tslib_1.__values(this.model.edges), _c = _b.next(); !_c.done; _c = _b.next()) { + var edge = _c.value; + var state_1 = _loop_1(edge); + if (state_1 === "break") + break; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + this.edgeDragging.isDragging = true; + if (swapConnector !== undefined) { + this.draggedEdgeSource = swapConnector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id); + this.edgeDragging.dragLabel = dragLabel; + this.edgeDragging.prevEdge = prevEdge; + } + else { + this.draggedEdgeSource = connector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id); + } + /** @type {?} */ + var canvas = this.modelService.canvasHtmlElement; + if (!canvas) { + throw new Error('No canvas while edgedraggingService found.'); + } + this.dragOffset.x = -canvas.getBoundingClientRect().left; + this.dragOffset.y = -canvas.getBoundingClientRect().top; + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + /** @type {?} */ + var originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + originalEvent.dataTransfer.setData('Text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + this.destinationHtmlElement = (/** @type {?} */ (event.target)); + this.oldDisplayStyle = this.destinationHtmlElement.style.display; + this.destinationHtmlElement.style.display = 'none'; + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.shadowDragStarted = true; + } + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.edgeDragging.gElement === undefined) { + this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class')); + this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path'); + this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle'); + } + this.edgeDragging.gElement.css('display', 'block'); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + event.stopPropagation(); + }; + /** + * @param {?} event + * @return {?} + */ + FcEdgeDraggingService.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (this.edgeDragging.isDragging) { + if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.destinationHtmlElement !== null) { + this.destinationHtmlElement.style.display = this.oldDisplayStyle; + } + if (this.edgeDragging.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + function () { + _this.edgeDragging.shadowDragStarted = false; + })); + } + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + function () { + if (_this.destinationHtmlElement !== null) { + _this.destinationHtmlElement.style.display = _this.oldDisplayStyle; + } + _this.edgeDragging.dragPoint2 = { + x: event.clientX + _this.dragOffset.x, + y: event.clientY + _this.dragOffset.y + }; + })); + } + } + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcEdgeDraggingService.prototype.dragoverConnector = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + event.preventDefault(); + event.stopPropagation(); + return false; + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcEdgeDraggingService.prototype.dragleaveMagnet = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.edgeDragging.magnetActive = false; + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcEdgeDraggingService.prototype.dragoverMagnet = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var _this = this; + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.magnetActive = true; + this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + event.preventDefault(); + event.stopPropagation(); + return false; + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.edgeDragging.dragPoint2 = _this.modelService.connectors.getCenteredCoord(connector.id); + event.preventDefault(); + event.stopPropagation(); + return false; + })); + } + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcEdgeDraggingService.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (this.edgeDragging.isDragging) { + this.edgeDragging.isDragging = false; + this.edgeDragging.dragPoint1 = null; + this.edgeDragging.dragPoint2 = null; + this.edgeDragging.dragLabel = null; + event.stopPropagation(); + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.gElement.css('display', 'none'); + } + if (this.edgeDragging.prevEdge) { + /** @type {?} */ + var edge_1 = this.edgeDragging.prevEdge; + this.edgeDragging.prevEdge = null; + this.applyFunction((/** + * @return {?} + */ + function () { + _this.modelService.edges.putEdge(edge_1); + })); + } + } + }; + /** + * @param {?} event + * @param {?} targetConnector + * @return {?} + */ + FcEdgeDraggingService.prototype.drop = /** + * @param {?} event + * @param {?} targetConnector + * @return {?} + */ + function (event, targetConnector) { + if (this.edgeDragging.isDragging) { + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: targetConnector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) { + this.edgeDragging.prevEdge = null; + this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel); + event.stopPropagation(); + event.preventDefault(); + return false; + } + } + }; + return FcEdgeDraggingService; +}()); +export { FcEdgeDraggingService }; +if (false) { + /** @type {?} */ + FcEdgeDraggingService.prototype.edgeDragging; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.draggedEdgeSource; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragOffset; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.destinationHtmlElement; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.oldDisplayStyle; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelValidation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.model; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.isValidEdgeCallback; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.applyFunction; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeStyle; +} +/** + * @record + */ +export function EdgeDragging() { } +if (false) { + /** @type {?} */ + EdgeDragging.prototype.isDragging; + /** @type {?} */ + EdgeDragging.prototype.shadowDragStarted; + /** @type {?} */ + EdgeDragging.prototype.dragPoint1; + /** @type {?} */ + EdgeDragging.prototype.dragPoint2; + /** @type {?|undefined} */ + EdgeDragging.prototype.dragLabel; + /** @type {?|undefined} */ + EdgeDragging.prototype.prevEdge; + /** @type {?|undefined} */ + EdgeDragging.prototype.magnetActive; + /** @type {?|undefined} */ + EdgeDragging.prototype.gElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.pathElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.circleElement; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoi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1cbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0IGludGVyZmFjZSBFZGdlRHJhZ2dpbmcge1xuICBpc0RyYWdnaW5nOiBib29sZWFuO1xuICBzaGFkb3dEcmFnU3RhcnRlZDogYm9vbGVhbjtcbiAgZHJhZ1BvaW50MTogRmNDb29yZHM7XG4gIGRyYWdQb2ludDI6IEZjQ29vcmRzO1xuICBkcmFnTGFiZWw/OiBzdHJpbmc7XG4gIHByZXZFZGdlPzogRmNFZGdlO1xuICBtYWduZXRBY3RpdmU/OiBib29sZWFuO1xuICBnRWxlbWVudD86IEpRdWVyeTxFbGVtZW50PjtcbiAgcGF0aEVsZW1lbnQ/OiBKUXVlcnk8RWxlbWVudD47XG4gIGNpcmNsZUVsZW1lbnQ/OiBKUXVlcnk8RWxlbWVudD47XG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/edge-drawing.service.js b/dist/ngx-flowchart/esm5/lib/edge-drawing.service.js new file mode 100644 index 0000000..65b8308 --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/edge-drawing.service.js @@ -0,0 +1,112 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { Injectable } from '@angular/core'; +import { FlowchartConstants } from './ngx-flowchart.models'; +var FcEdgeDrawingService = /** @class */ (function () { + function FcEdgeDrawingService() { + } + /** + * @param {?} pt1 + * @param {?} pt2 + * @param {?} style + * @return {?} + */ + FcEdgeDrawingService.prototype.getEdgeDAttribute = /** + * @param {?} pt1 + * @param {?} pt2 + * @param {?} style + * @return {?} + */ + function (pt1, pt2, style) { + /** @type {?} */ + var dAddribute = "M " + pt1.x + ", " + pt1.y + " "; + if (style === FlowchartConstants.curvedStyle) { + /** @type {?} */ + var sourceTangent = this.computeEdgeSourceTangent(pt1, pt2); + /** @type {?} */ + var destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2); + dAddribute += "C " + sourceTangent.x + ", " + sourceTangent.y + " " + (destinationTangent.x - 50) + ", " + destinationTangent.y + " " + pt2.x + ", " + pt2.y; + } + else { + dAddribute += "L " + pt2.x + ", " + pt2.y; + } + return dAddribute; + }; + /** + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.getEdgeCenter = /** + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return { + x: (pt1.x + pt2.x) / 2, + y: (pt1.y + pt2.y) / 2 + }; + }; + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.computeEdgeTangentOffset = /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return (pt2.y - pt1.y) / 2; + }; + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.computeEdgeSourceTangent = /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return { + x: pt1.x, + y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2) + }; + }; + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.computeEdgeDestinationTangent = /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return { + x: pt2.x, + y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2) + }; + }; + FcEdgeDrawingService.decorators = [ + { type: Injectable } + ]; + /** @nocollapse */ + FcEdgeDrawingService.ctorParameters = function () { return []; }; + return FcEdgeDrawingService; +}()); +export { FcEdgeDrawingService }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRnZS1kcmF3aW5nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL2VkZ2UtZHJhd2luZy5zZXJ2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AvIDIsXG4gICAgICB5OiAocHQxLnkgKyBwdDIueSkgLyAyXG4gICAgfTtcbiAgfVxuXG4gIHByaXZhdGUgY29tcHV0ZUVkZ2VUYW5nZW50T2Zmc2V0KHB0MTogRmNDb29yZHMsIHB0MjogRmNDb29yZHMpOiBudW1iZXIge1xuICAgIHJldHVybiAocHQyLnkgLSBwdDEueSkgLyAyO1xuICB9XG5cbiAgcHJpdmF0ZSBjb21wdXRlRWRnZVNvdXJjZVRhbmdlbnQocHQxOiBGY0Nvb3JkcywgcHQyOiBGY0Nvb3Jkcyk6IEZjQ29vcmRzIHtcbiAgICByZXR1cm4ge1xuICAgICAgeDogcHQxLngsXG4gICAgICB5OiBwdDEueSArIHRoaXMuY29tcHV0ZUVkZ2VUYW5nZW50T2Zmc2V0KHB0MSwgcHQyKVxuICAgIH07XG4gIH1cblxuICBwcml2YXRlIGNvbXB1dGVFZGdlRGVzdGluYXRpb25UYW5nZW50KHB0MTogRmNDb29yZHMsIHB0MjogRmNDb29yZHMpOiBGY0Nvb3JkcyB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHg6IHB0Mi54LFxuICAgICAgeTogcHQyLnkgLSB0aGlzLmNvbXB1dGVFZGdlVGFuZ2VudE9mZnNldChwdDEsIHB0MilcbiAgICB9O1xuICB9XG5cbn1cbiJdfQ== \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/magnet.directive.js b/dist/ngx-flowchart/esm5/lib/magnet.directive.js new file mode 100644 index 0000000..17612d1 --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/magnet.directive.js @@ -0,0 +1,95 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { Directive, ElementRef, HostListener, Input } from '@angular/core'; +import { FlowchartConstants } from './ngx-flowchart.models'; +var FcMagnetDirective = /** @class */ (function () { + function FcMagnetDirective(elementRef) { + this.elementRef = elementRef; + } + /** + * @return {?} + */ + FcMagnetDirective.prototype.ngOnInit = /** + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.magnetClass); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + return this.callbacks.edgeDragoverMagnet(event, this.connector); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.dragleave = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.callbacks.edgeDragleaveMagnet(event); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + return this.callbacks.edgeDrop(event, this.connector); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.callbacks.edgeDragend(event); + }; + FcMagnetDirective.decorators = [ + { type: Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-magnet]' + },] } + ]; + /** @nocollapse */ + FcMagnetDirective.ctorParameters = function () { return [ + { type: ElementRef } + ]; }; + FcMagnetDirective.propDecorators = { + callbacks: [{ type: Input }], + connector: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + dragleave: [{ type: HostListener, args: ['dragleave', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }] + }; + return FcMagnetDirective; +}()); +export { FcMagnetDirective }; +if (false) { + /** @type {?} */ + FcMagnetDirective.prototype.callbacks; + /** @type {?} */ + FcMagnetDirective.prototype.connector; + /** @type {?} */ + FcMagnetDirective.prototype.elementRef; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnbmV0LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJsaWIvbWF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dG9yKHB1YmxpYyBlbGVtZW50UmVmOiBFbGVtZW50UmVmPEhUTUxFbGVtZW50Pikge1xuICB9XG5cbiAgbmdPbkluaXQoKTogdm9pZCB7XG4gICAgY29uc3QgZWxlbWVudCA9ICQodGhpcy5lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQpO1xuICAgIGVsZW1lbnQuYWRkQ2xhc3MoRmxvd2NoYXJ0Q29uc3RhbnRzLm1hZ25ldENsYXNzKTtcbiAgfVxuXG4gIEBIb3N0TGlzdGVuZXIoJ2RyYWdvdmVyJywgWyckZXZlbnQnXSlcbiAgZHJhZ292ZXIoZXZlbnQ6IERyYWdFdmVudCkge1xuICAgIHJldHVybiB0aGlzLmNhbGxiYWNrcy5lZGdlRHJhZ292ZXJNYWduZXQoZXZlbnQsIHRoaXMuY29ubmVjdG9yKTtcbiAgfVxuXG4gIEBIb3N0TGlzdGVuZXIoJ2RyYWdsZWF2ZScsIFsnJGV2ZW50J10pXG4gIGRyYWdsZWF2ZShldmVudDogRHJhZ0V2ZW50KSB7XG4gICAgdGhpcy5jYWxsYmFja3MuZWRnZURyYWdsZWF2ZU1hZ25ldChldmVudCk7XG4gIH1cblxuICBASG9zdExpc3RlbmVyKCdkcm9wJywgWyckZXZlbnQnXSlcbiAgZHJvcChldmVudDogRHJhZ0V2ZW50KSB7XG4gICAgcmV0dXJuIHRoaXMuY2FsbGJhY2tzLmVkZ2VEcm9wKGV2ZW50LCB0aGlzLmNvbm5lY3Rvcik7XG4gIH1cblxuICBASG9zdExpc3RlbmVyKCdkcmFnZW5kJywgWyckZXZlbnQnXSlcbiAgZHJhZ2VuZChldmVudDogRHJhZ0V2ZW50KSB7XG4gICAgdGhpcy5jYWxsYmFja3MuZWRnZURyYWdlbmQoZXZlbnQpO1xuICB9XG5cbn1cbiJdfQ== \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/model.service.js b/dist/ngx-flowchart/esm5/lib/model.service.js new file mode 100644 index 0000000..5095f1e --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/model.service.js @@ -0,0 +1,1016 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import * as tslib_1 from "tslib"; +import { of } from 'rxjs'; +var FcModelService = /** @class */ (function () { + function FcModelService(modelValidation, model, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) { + this.connectorsHtmlElements = {}; + this.nodesHtmlElements = {}; + this.canvasHtmlElement = null; + this.dragImage = null; + this.svgHtmlElement = null; + this.modelValidation = modelValidation; + this.model = model; + this.cd = cd; + this.canvasHtmlElement = canvasHtmlElement; + this.svgHtmlElement = svgHtmlElement; + this.modelValidation.validateModel(this.model); + this.selectedObjects = selectedObjects; + this.dropNode = dropNode || ((/** + * @return {?} + */ + function () { })); + this.createEdge = createEdge || ((/** + * @return {?} + */ + function () { return of({ label: 'label' }); })); + this.edgeAddedCallback = edgeAddedCallback || ((/** + * @return {?} + */ + function () { })); + this.nodeRemovedCallback = nodeRemovedCallback || ((/** + * @return {?} + */ + function () { })); + this.edgeRemovedCallback = edgeRemovedCallback || ((/** + * @return {?} + */ + function () { })); + this.connectors = new ConnectorsModel(this); + this.nodes = new NodesModel(this); + this.edges = new EdgesModel(this); + } + /** + * @return {?} + */ + FcModelService.prototype.detectChanges = /** + * @return {?} + */ + function () { + var _this = this; + setTimeout((/** + * @return {?} + */ + function () { + _this.cd.detectChanges(); + }), 0); + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.selectObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + if (this.isEditable()) { + if (this.selectedObjects.indexOf(object) === -1) { + this.selectedObjects.push(object); + } + } + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.deselectObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + if (this.isEditable()) { + /** @type {?} */ + var index = this.selectedObjects.indexOf(object); + if (index === -1) { + throw new Error('Tried to deselect an unselected object'); + } + this.selectedObjects.splice(index, 1); + } + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.toggleSelectedObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + if (this.isSelectedObject(object)) { + this.deselectObject(object); + } + else { + this.selectObject(object); + } + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.isSelectedObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.selectedObjects.indexOf(object) !== -1; + }; + /** + * @return {?} + */ + FcModelService.prototype.selectAll = /** + * @return {?} + */ + function () { + var _this = this; + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + if (!node.readonly) { + _this.nodes.select(node); + } + })); + this.model.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + _this.edges.select(edge); + })); + this.detectChanges(); + }; + /** + * @return {?} + */ + FcModelService.prototype.deselectAll = /** + * @return {?} + */ + function () { + this.selectedObjects.splice(0, this.selectedObjects.length); + this.detectChanges(); + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.isEditObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.selectedObjects.length === 1 && + this.selectedObjects.indexOf(object) !== -1; + }; + /** + * @private + * @param {?} x + * @param {?} y + * @param {?} rectBox + * @return {?} + */ + FcModelService.prototype.inRectBox = /** + * @private + * @param {?} x + * @param {?} y + * @param {?} rectBox + * @return {?} + */ + function (x, y, rectBox) { + return x >= rectBox.left && x <= rectBox.right && + y >= rectBox.top && y <= rectBox.bottom; + }; + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + FcModelService.prototype.getItemInfoAtPoint = /** + * @param {?} x + * @param {?} y + * @return {?} + */ + function (x, y) { + return { + node: this.getNodeAtPoint(x, y), + edge: this.getEdgeAtPoint(x, y) + }; + }; + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + FcModelService.prototype.getNodeAtPoint = /** + * @param {?} x + * @param {?} y + * @return {?} + */ + function (x, y) { + var e_1, _a; + try { + for (var _b = tslib_1.__values(this.model.nodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + /** @type {?} */ + var element = this.nodes.getHtmlElement(node.id); + /** @type {?} */ + var nodeElementBox = element.getBoundingClientRect(); + if (x >= nodeElementBox.left && x <= nodeElementBox.right + && y >= nodeElementBox.top && y <= nodeElementBox.bottom) { + return node; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return null; + }; + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + FcModelService.prototype.getEdgeAtPoint = /** + * @param {?} x + * @param {?} y + * @return {?} + */ + function (x, y) { + /** @type {?} */ + var element = document.elementFromPoint(x, y); + /** @type {?} */ + var id = element.id; + /** @type {?} */ + var edgeIndex = -1; + if (id) { + if (id.startsWith('fc-edge-path-')) { + edgeIndex = Number(id.substring('fc-edge-path-'.length)); + } + else if (id.startsWith('fc-edge-label-')) { + edgeIndex = Number(id.substring('fc-edge-label-'.length)); + } + } + if (edgeIndex > -1) { + return this.model.edges[edgeIndex]; + } + return null; + }; + /** + * @param {?} rectBox + * @return {?} + */ + FcModelService.prototype.selectAllInRect = /** + * @param {?} rectBox + * @return {?} + */ + function (rectBox) { + var _this = this; + this.model.nodes.forEach((/** + * @param {?} value + * @return {?} + */ + function (value) { + /** @type {?} */ + var element = _this.nodes.getHtmlElement(value.id); + /** @type {?} */ + var nodeElementBox = element.getBoundingClientRect(); + if (!value.readonly) { + /** @type {?} */ + var x = nodeElementBox.left + nodeElementBox.width / 2; + /** @type {?} */ + var y = nodeElementBox.top + nodeElementBox.height / 2; + if (_this.inRectBox(x, y, rectBox)) { + _this.nodes.select(value); + } + else { + if (_this.nodes.isSelected(value)) { + _this.nodes.deselect(value); + } + } + } + })); + /** @type {?} */ + var canvasElementBox = this.canvasHtmlElement.getBoundingClientRect(); + this.model.edges.forEach((/** + * @param {?} value + * @return {?} + */ + function (value) { + /** @type {?} */ + var start = _this.edges.sourceCoord(value); + /** @type {?} */ + var end = _this.edges.destCoord(value); + /** @type {?} */ + var x = (start.x + end.x) / 2 + canvasElementBox.left; + /** @type {?} */ + var y = (start.y + end.y) / 2 + canvasElementBox.top; + if (_this.inRectBox(x, y, rectBox)) { + _this.edges.select(value); + } + else { + if (_this.edges.isSelected(value)) { + _this.edges.deselect(value); + } + } + })); + }; + /** + * @return {?} + */ + FcModelService.prototype.deleteSelected = /** + * @return {?} + */ + function () { + var _this = this; + /** @type {?} */ + var edgesToDelete = this.edges.getSelectedEdges(); + edgesToDelete.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + _this.edges.delete(edge); + })); + /** @type {?} */ + var nodesToDelete = this.nodes.getSelectedNodes(); + nodesToDelete.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + _this.nodes.delete(node); + })); + }; + /** + * @return {?} + */ + FcModelService.prototype.isEditable = /** + * @return {?} + */ + function () { + return this.dropTargetId === undefined; + }; + /** + * @return {?} + */ + FcModelService.prototype.isDropSource = /** + * @return {?} + */ + function () { + return this.dropTargetId !== undefined; + }; + /** + * @return {?} + */ + FcModelService.prototype.getDragImage = /** + * @return {?} + */ + function () { + if (!this.dragImage) { + this.dragImage = new Image(); + this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + this.dragImage.style.visibility = 'hidden'; + } + return this.dragImage; + }; + /** + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @return {?} + */ + FcModelService.prototype.registerCallbacks = /** + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @return {?} + */ + function (edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback) { + this.edgeAddedCallback = edgeAddedCallback; + this.nodeRemovedCallback = nodeRemovedCallback; + this.edgeRemovedCallback = edgeRemovedCallback; + }; + return FcModelService; +}()); +export { FcModelService }; +if (false) { + /** @type {?} */ + FcModelService.prototype.modelValidation; + /** @type {?} */ + FcModelService.prototype.model; + /** @type {?} */ + FcModelService.prototype.cd; + /** @type {?} */ + FcModelService.prototype.selectedObjects; + /** @type {?} */ + FcModelService.prototype.connectorsHtmlElements; + /** @type {?} */ + FcModelService.prototype.nodesHtmlElements; + /** @type {?} */ + FcModelService.prototype.canvasHtmlElement; + /** @type {?} */ + FcModelService.prototype.dragImage; + /** @type {?} */ + FcModelService.prototype.svgHtmlElement; + /** @type {?} */ + FcModelService.prototype.dropNode; + /** @type {?} */ + FcModelService.prototype.createEdge; + /** @type {?} */ + FcModelService.prototype.edgeAddedCallback; + /** @type {?} */ + FcModelService.prototype.nodeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.edgeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.dropTargetId; + /** @type {?} */ + FcModelService.prototype.connectors; + /** @type {?} */ + FcModelService.prototype.nodes; + /** @type {?} */ + FcModelService.prototype.edges; +} +/** + * @record + */ +function HtmlElementMap() { } +/** + * @abstract + * @template T + */ +var /** + * @abstract + * @template T + */ +AbstractFcModel = /** @class */ (function () { + function AbstractFcModel(modelService) { + this.modelService = modelService; + } + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.select = /** + * @param {?} object + * @return {?} + */ + function (object) { + this.modelService.selectObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.deselect = /** + * @param {?} object + * @return {?} + */ + function (object) { + this.modelService.deselectObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.toggleSelected = /** + * @param {?} object + * @return {?} + */ + function (object) { + this.modelService.toggleSelectedObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.isSelected = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.modelService.isSelectedObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.isEdit = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.modelService.isEditObject(object); + }; + return AbstractFcModel; +}()); +if (false) { + /** @type {?} */ + AbstractFcModel.prototype.modelService; +} +var ConnectorsModel = /** @class */ (function (_super) { + tslib_1.__extends(ConnectorsModel, _super); + function ConnectorsModel(modelService) { + return _super.call(this, modelService) || this; + } + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getConnector = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + var e_2, _a, e_3, _b; + /** @type {?} */ + var model = this.modelService.model; + try { + for (var _c = tslib_1.__values(model.nodes), _d = _c.next(); !_d.done; _d = _c.next()) { + var node = _d.value; + try { + for (var _e = (e_3 = void 0, tslib_1.__values(node.connectors)), _f = _e.next(); !_f.done; _f = _e.next()) { + var connector = _f.value; + if (connector.id === connectorId) { + return connector; + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_3) throw e_3.error; } + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_2) throw e_2.error; } + } + }; + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getHtmlElement = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + return this.modelService.connectorsHtmlElements[connectorId]; + }; + /** + * @param {?} connectorId + * @param {?} element + * @return {?} + */ + ConnectorsModel.prototype.setHtmlElement = /** + * @param {?} connectorId + * @param {?} element + * @return {?} + */ + function (connectorId, element) { + this.modelService.connectorsHtmlElements[connectorId] = element; + this.modelService.detectChanges(); + }; + /** + * @private + * @param {?} connectorId + * @param {?=} centered + * @return {?} + */ + ConnectorsModel.prototype._getCoords = /** + * @private + * @param {?} connectorId + * @param {?=} centered + * @return {?} + */ + function (connectorId, centered) { + /** @type {?} */ + var element = this.getHtmlElement(connectorId); + /** @type {?} */ + var canvas = this.modelService.canvasHtmlElement; + if (element === null || element === undefined || canvas === null) { + return { x: 0, y: 0 }; + } + /** @type {?} */ + var connectorElementBox = element.getBoundingClientRect(); + /** @type {?} */ + var canvasElementBox = canvas.getBoundingClientRect(); + /** @type {?} */ + var coords = { + x: connectorElementBox.left - canvasElementBox.left, + y: connectorElementBox.top - canvasElementBox.top + }; + if (centered) { + coords = { + x: Math.round(coords.x + element.offsetWidth / 2), + y: Math.round(coords.y + element.offsetHeight / 2) + }; + } + return coords; + }; + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getCoords = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + return this._getCoords(connectorId, false); + }; + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getCenteredCoord = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + return this._getCoords(connectorId, true); + }; + return ConnectorsModel; +}(AbstractFcModel)); +var NodesModel = /** @class */ (function (_super) { + tslib_1.__extends(NodesModel, _super); + function NodesModel(modelService) { + return _super.call(this, modelService) || this; + } + /** + * @param {?} node + * @param {?} type + * @return {?} + */ + NodesModel.prototype.getConnectorsByType = /** + * @param {?} node + * @param {?} type + * @return {?} + */ + function (node, type) { + return node.connectors.filter((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.type === type; + })); + }; + /** + * @private + * @param {?} node + * @param {?} connector + * @return {?} + */ + NodesModel.prototype._addConnector = /** + * @private + * @param {?} node + * @param {?} connector + * @return {?} + */ + function (node, connector) { + node.connectors.push(connector); + try { + this.modelService.modelValidation.validateNode(node); + } + catch (error) { + node.connectors.splice(node.connectors.indexOf(connector), 1); + throw error; + } + }; + /** + * @param {?} node + * @return {?} + */ + NodesModel.prototype.delete = /** + * @param {?} node + * @return {?} + */ + function (node) { + if (this.isSelected(node)) { + this.deselect(node); + } + /** @type {?} */ + var model = this.modelService.model; + /** @type {?} */ + var index = model.nodes.indexOf(node); + if (index === -1) { + if (node === undefined) { + throw new Error('Passed undefined'); + } + throw new Error('Tried to delete not existing node'); + } + /** @type {?} */ + var connectorIds = this.getConnectorIds(node); + for (var i = 0; i < model.edges.length; i++) { + /** @type {?} */ + var edge = model.edges[i]; + if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) { + this.modelService.edges.delete(edge); + i--; + } + } + model.nodes.splice(index, 1); + this.modelService.nodeRemovedCallback(node); + }; + /** + * @return {?} + */ + NodesModel.prototype.getSelectedNodes = /** + * @return {?} + */ + function () { + var _this = this; + /** @type {?} */ + var model = this.modelService.model; + return model.nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { + return _this.modelService.nodes.isSelected(node); + })); + }; + /** + * @param {?} node + * @param {?=} ctrlKey + * @return {?} + */ + NodesModel.prototype.handleClicked = /** + * @param {?} node + * @param {?=} ctrlKey + * @return {?} + */ + function (node, ctrlKey) { + if (ctrlKey) { + this.modelService.nodes.toggleSelected(node); + } + else { + this.modelService.deselectAll(); + this.modelService.nodes.select(node); + } + }; + /** + * @private + * @param {?} node + * @return {?} + */ + NodesModel.prototype._addNode = /** + * @private + * @param {?} node + * @return {?} + */ + function (node) { + /** @type {?} */ + var model = this.modelService.model; + try { + model.nodes.push(node); + this.modelService.modelValidation.validateNodes(model.nodes); + } + catch (error) { + model.nodes.splice(model.nodes.indexOf(node), 1); + throw error; + } + }; + /** + * @param {?} node + * @return {?} + */ + NodesModel.prototype.getConnectorIds = /** + * @param {?} node + * @return {?} + */ + function (node) { + return node.connectors.map((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.id; + })); + }; + /** + * @param {?} connectorId + * @return {?} + */ + NodesModel.prototype.getNodeByConnectorId = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + var e_4, _a; + /** @type {?} */ + var model = this.modelService.model; + try { + for (var _b = tslib_1.__values(model.nodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + /** @type {?} */ + var connectorIds = this.getConnectorIds(node); + if (connectorIds.indexOf(connectorId) > -1) { + return node; + } + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_4) throw e_4.error; } + } + return null; + }; + /** + * @param {?} nodeId + * @return {?} + */ + NodesModel.prototype.getHtmlElement = /** + * @param {?} nodeId + * @return {?} + */ + function (nodeId) { + return this.modelService.nodesHtmlElements[nodeId]; + }; + /** + * @param {?} nodeId + * @param {?} element + * @return {?} + */ + NodesModel.prototype.setHtmlElement = /** + * @param {?} nodeId + * @param {?} element + * @return {?} + */ + function (nodeId, element) { + this.modelService.nodesHtmlElements[nodeId] = element; + this.modelService.detectChanges(); + }; + return NodesModel; +}(AbstractFcModel)); +var EdgesModel = /** @class */ (function (_super) { + tslib_1.__extends(EdgesModel, _super); + function EdgesModel(modelService) { + return _super.call(this, modelService) || this; + } + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.ready = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var source = this.modelService.connectors.getHtmlElement(edge.source); + /** @type {?} */ + var destination = this.modelService.connectors.getHtmlElement(edge.destination); + return source !== undefined && destination !== undefined; + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.sourceCoord = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + return this.modelService.connectors.getCenteredCoord(edge.source); + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.destCoord = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + return this.modelService.connectors.getCenteredCoord(edge.destination); + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.delete = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var model = this.modelService.model; + /** @type {?} */ + var index = model.edges.indexOf(edge); + if (index === -1) { + throw new Error('Tried to delete not existing edge'); + } + if (this.isSelected(edge)) { + this.deselect(edge); + } + model.edges.splice(index, 1); + this.modelService.edgeRemovedCallback(edge); + }; + /** + * @return {?} + */ + EdgesModel.prototype.getSelectedEdges = /** + * @return {?} + */ + function () { + var _this = this; + /** @type {?} */ + var model = this.modelService.model; + return model.edges.filter((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + return _this.modelService.edges.isSelected(edge); + })); + }; + /** + * @param {?} edge + * @param {?=} ctrlKey + * @return {?} + */ + EdgesModel.prototype.handleEdgeMouseClick = /** + * @param {?} edge + * @param {?=} ctrlKey + * @return {?} + */ + function (edge, ctrlKey) { + if (ctrlKey) { + this.modelService.edges.toggleSelected(edge); + } + else { + this.modelService.deselectAll(); + this.modelService.edges.select(edge); + } + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.putEdge = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var model = this.modelService.model; + model.edges.push(edge); + }; + /** + * @param {?} event + * @param {?} sourceConnector + * @param {?} destConnector + * @param {?} label + * @return {?} + */ + EdgesModel.prototype._addEdge = /** + * @param {?} event + * @param {?} sourceConnector + * @param {?} destConnector + * @param {?} label + * @return {?} + */ + function (event, sourceConnector, destConnector, label) { + var _this = this; + this.modelService.modelValidation.validateConnector(sourceConnector); + this.modelService.modelValidation.validateConnector(destConnector); + /** @type {?} */ + var edge = {}; + edge.source = sourceConnector.id; + edge.destination = destConnector.id; + edge.label = label; + /** @type {?} */ + var model = this.modelService.model; + this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes); + this.modelService.createEdge(event, edge).subscribe((/** + * @param {?} created + * @return {?} + */ + function (created) { + model.edges.push(created); + _this.modelService.edgeAddedCallback(created); + })); + }; + return EdgesModel; +}(AbstractFcModel)); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kZWwuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJsaWIvbW9kZWwuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hc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IGVkZ2U6IEZjRWRnZSA9IHt9O1xuICAgIGVkZ2Uuc291cmNlID0gc291cmNlQ29ubmVjdG9yLmlkO1xuICAgIGVkZ2UuZGVzdGluYXRpb24gPSBkZXN0Q29ubmVjdG9yLmlkO1xuICAgIGVkZ2UubGFiZWwgPSBsYWJlbDtcbiAgICBjb25zdCBtb2RlbCA9IHRoaXMubW9kZWxTZXJ2aWNlLm1vZGVsO1xuICAgIHRoaXMubW9kZWxTZXJ2aWNlLm1vZGVsVmFsaWRhdGlvbi52YWxpZGF0ZUVkZ2VzKG1vZGVsLmVkZ2VzLmNvbmNhdChbZWRnZV0pLCBtb2RlbC5ub2Rlcyk7XG4gICAgdGhpcy5tb2RlbFNlcnZpY2UuY3JlYXRlRWRnZShldmVudCwgZWRnZSkuc3Vic2NyaWJlKFxuICAgICAgKGNyZWF0ZWQpID0+IHtcbiAgICAgICAgbW9kZWwuZWRnZXMucHVzaChjcmVhdGVkKTtcbiAgICAgICAgdGhpcy5tb2RlbFNlcnZpY2UuZWRnZUFkZGVkQ2FsbGJhY2soY3JlYXRlZCk7XG4gICAgICB9XG4gICAgKTtcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/modelvalidation.service.js b/dist/ngx-flowchart/esm5/lib/modelvalidation.service.js new file mode 100644 index 0000000..3174c82 --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/modelvalidation.service.js @@ -0,0 +1,252 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import { Injectable } from '@angular/core'; +import { fcTopSort, ModelvalidationError } from './ngx-flowchart.models'; +var FcModelValidationService = /** @class */ (function () { + function FcModelValidationService() { + } + /** + * @param {?} model + * @return {?} + */ + FcModelValidationService.prototype.validateModel = /** + * @param {?} model + * @return {?} + */ + function (model) { + this.validateNodes(model.nodes); + this._validateEdges(model.edges, model.nodes); + return model; + }; + /** + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype.validateNodes = /** + * @param {?} nodes + * @return {?} + */ + function (nodes) { + var _this = this; + /** @type {?} */ + var ids = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + _this.validateNode(node); + if (ids.indexOf(node.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + ids.push(node.id); + })); + /** @type {?} */ + var connectorIds = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + if (connectorIds.indexOf(connector.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + connectorIds.push(connector.id); + })); + })); + return nodes; + }; + /** + * @param {?} node + * @return {?} + */ + FcModelValidationService.prototype.validateNode = /** + * @param {?} node + * @return {?} + */ + function (node) { + var _this = this; + if (node.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (typeof node.name !== 'string') { + throw new ModelvalidationError('Name not valid.'); + } + if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (!Array.isArray(node.connectors)) { + throw new ModelvalidationError('Connectors not valid.'); + } + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + _this.validateConnector(connector); + })); + return node; + }; + /** + * @private + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype._validateEdges = /** + * @private + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + function (edges, nodes) { + var _this = this; + edges.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + _this._validateEdge(edge, nodes); + })); + edges.forEach((/** + * @param {?} edge1 + * @param {?} index1 + * @return {?} + */ + function (edge1, index1) { + edges.forEach((/** + * @param {?} edge2 + * @param {?} index2 + * @return {?} + */ + function (edge2, index2) { + if (index1 !== index2) { + if ((edge1.source === edge2.source && edge1.destination === edge2.destination) || + (edge1.source === edge2.destination && edge1.destination === edge2.source)) { + throw new ModelvalidationError('Duplicated edge.'); + } + } + })); + })); + if (fcTopSort({ nodes: nodes, edges: edges }) === null) { + throw new ModelvalidationError('Graph has a circle.'); + } + return edges; + }; + /** + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype.validateEdges = /** + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + function (edges, nodes) { + this.validateNodes(nodes); + return this._validateEdges(edges, nodes); + }; + /** + * @private + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype._validateEdge = /** + * @private + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + function (edge, nodes) { + if (edge.source === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + if (edge.destination === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (edge.source === edge.destination) { + throw new ModelvalidationError('Edge with same source and destination connectors.'); + } + /** @type {?} */ + var sourceNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { return connector.id === edge.source; })); }))[0]; + if (sourceNode === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + /** @type {?} */ + var destinationNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { return connector.id === edge.destination; })); }))[0]; + if (destinationNode === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (sourceNode === destinationNode) { + throw new ModelvalidationError('Edge with same source and destination nodes.'); + } + return edge; + }; + /** + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype.validateEdge = /** + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + function (edge, nodes) { + this.validateNodes(nodes); + return this._validateEdge(edge, nodes); + }; + /** + * @param {?} connector + * @return {?} + */ + FcModelValidationService.prototype.validateConnector = /** + * @param {?} connector + * @return {?} + */ + function (connector) { + if (connector.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') { + throw new ModelvalidationError('Type not valid.'); + } + return connector; + }; + FcModelValidationService.decorators = [ + { type: Injectable } + ]; + /** @nocollapse */ + FcModelValidationService.ctorParameters = function () { return []; }; + return FcModelValidationService; +}()); +export { FcModelValidationService }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kZWx2YWxpZGF0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL21vZGVsdmFsaWRhdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBd0MsU0FBUyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFL0c7SUFHRTtJQUFnQixDQUFDOzs7OztJQUVWLGdEQUFhOzs7O0lBQXBCLFVBQXFCLEtBQWM7UUFDakMsSUFBSSxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDaEMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsS0FBSyxFQUFFLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUM5QyxPQUFPLEtBQUssQ0FBQztJQUNmLENBQUM7Ozs7O0lBRU0sZ0RBQWE7Ozs7SUFBcEIsVUFBcUIsS0FBb0I7UUFBekMsaUJBbUJDOztZQWxCTyxHQUFHLEdBQWEsRUFBRTtRQUN4QixLQUFLLENBQUMsT0FBTzs7OztRQUFDLFVBQUMsSUFBSTtZQUNqQixLQUFJLENBQUMsWUFBWSxDQUFDLElBQ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XG4gICAgfVxuICAgIGlmIChjb25uZWN0b3IudHlwZSA9PT0gdW5kZWZpbmVkIHx8IGNvbm5lY3Rvci50eXBlID09PSBudWxsIHx8IHR5cGVvZiBjb25uZWN0b3IudHlwZSAhPT0gJ3N0cmluZycpIHtcbiAgICAgIHRocm93IG5ldyBNb2RlbHZhbGlkYXRpb25FcnJvcignVHlwZSBub3QgdmFsaWQuJyk7XG4gICAgfVxuICAgIHJldHVybiBjb25uZWN0b3I7XG4gIH1cblxufVxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/mouseover.service.js b/dist/ngx-flowchart/esm5/lib/mouseover.service.js new file mode 100644 index 0000000..6c1d199 --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/mouseover.service.js @@ -0,0 +1,140 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var FcMouseOverService = /** @class */ (function () { + function FcMouseOverService(applyFunction) { + this.mouseoverscope = { + connector: null, + edge: null, + node: null + }; + this.applyFunction = applyFunction; + } + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + FcMouseOverService.prototype.nodeMouseOver = /** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.node = node; + })); + }; + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + FcMouseOverService.prototype.nodeMouseOut = /** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.node = null; + })); + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcMouseOverService.prototype.connectorMouseEnter = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.connector = connector; + })); + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcMouseOverService.prototype.connectorMouseLeave = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.connector = null; + })); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + FcMouseOverService.prototype.edgeMouseEnter = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverscope.edge = edge; + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + FcMouseOverService.prototype.edgeMouseLeave = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverscope.edge = null; + }; + return FcMouseOverService; +}()); +export { FcMouseOverService }; +if (false) { + /** @type {?} */ + FcMouseOverService.prototype.mouseoverscope; + /** + * @type {?} + * @private + */ + FcMouseOverService.prototype.applyFunction; +} +/** + * @record + */ +export function MouseOverScope() { } +if (false) { + /** @type {?} */ + MouseOverScope.prototype.connector; + /** @type {?} */ + MouseOverScope.prototype.edge; + /** @type {?} */ + MouseOverScope.prototype.node; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW91c2VvdmVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL21vdXNlb3Zlci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFFQTtJQVVFLDRCQUFZLGFBQWtEO1FBUjlELG1CQUFjLEdBQW1CO1lBQy9CLFNBQVMsRUFBRSxJQUFJO1lBQ2YsSUFBSSxFQUFFLElBQUk7WUFDVixJQUFJLEVBQUUsSUFBSTtTQUNYLENBQUM7UUFLQSxJQUFJLENBQUMsYUFBYSxHQUFHLGFBQWEsQ0FBQztJQUNyQyxDQUFDOzs7Ozs7SUFFTSwwQ0FBYTs7Ozs7SUFBcEIsVUFBcUIs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ngx-flowchart/esm5/lib/ngx-flowchart.component.js b/dist/ngx-flowchart/esm5/lib/ngx-flowchart.component.js index 9d27ec1..201cbed 100644 --- a/dist/ngx-flowchart/esm5/lib/ngx-flowchart.component.js +++ b/dist/ngx-flowchart/esm5/lib/ngx-flowchart.component.js @@ -2,10 +2,54 @@ * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ -import { Component } from '@angular/core'; +import * as tslib_1 from "tslib"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, HostBinding, HostListener, Input, IterableDiffers, NgZone } from '@angular/core'; +import { FlowchartConstants } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +import { FcModelValidationService } from './modelvalidation.service'; +import { FcNodeDraggingService } from './node-dragging.service'; +import { FcEdgeDrawingService } from './edge-drawing.service'; +import { FcEdgeDraggingService } from './edge-dragging.service'; +import { FcMouseOverService } from './mouseover.service'; +import { FcRectangleSelectService } from './rectangleselect.service'; var NgxFlowchartComponent = /** @class */ (function () { - function NgxFlowchartComponent() { + function NgxFlowchartComponent(elementRef, differs, modelValidation, edgeDrawingService, cd, zone) { + this.elementRef = elementRef; + this.differs = differs; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.cd = cd; + this.zone = zone; + this.flowchartConstants = FlowchartConstants; + this.nodesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + function (index, item) { + return item; + })); + this.edgesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + function (index, item) { + return item; + })); + this.arrowDefId = 'arrow-' + Math.random(); + this.arrowDefIdSelected = this.arrowDefId + '-selected'; } + Object.defineProperty(NgxFlowchartComponent.prototype, "canvasClass", { + get: /** + * @return {?} + */ + function () { + return FlowchartConstants.canvasClass; + }, + enumerable: true, + configurable: true + }); /** * @return {?} */ @@ -13,16 +57,471 @@ var NgxFlowchartComponent = /** @class */ (function () { * @return {?} */ function () { + var e_1, _a; + var _this = this; + if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) { + throw new Error('edgeStyle not supported.'); + } + this.nodeHeight = this.nodeHeight || 200; + this.nodeWidth = this.nodeWidth || 200; + this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint; + this.userCallbacks = this.userCallbacks || {}; + this.automaticResize = this.automaticResize || false; + try { + for (var _b = tslib_1.__values(Object.keys(this.userCallbacks)), _c = _b.next(); !_c.done; _c = _b.next()) { + var key = _c.value; + /** @type {?} */ + var callback = this.userCallbacks[key]; + if (typeof callback !== 'function' && key !== 'nodeCallbacks') { + throw new Error('All callbacks should be functions.'); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + this.userNodeCallbacks = this.userCallbacks.nodeCallbacks; + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects, this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved, this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg')); + if (this.dropTargetId) { + this.modelService.dropTargetId = this.dropTargetId; + } + /** @type {?} */ + var applyFunction = this.zone.run.bind(this.zone); + this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction, this.automaticResize, this.dragAnimation); + this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService, this.model, this.userCallbacks.isValidEdge || null, applyFunction, this.dragAnimation, this.edgeStyle); + this.mouseoverService = new FcMouseOverService(applyFunction); + this.rectangleSelectService = new FcRectangleSelectService(this.modelService, element[0].querySelector('#select-rectangle'), applyFunction); + this.callbacks = { + nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService), + nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService), + edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService), + edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService), + edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService), + edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService), + edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService), + edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService), + nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService), + nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService), + connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService), + connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService), + nodeClicked: (/** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + _this.modelService.nodes.handleClicked(node, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + }) + }; + this.adjustCanvasSize(true); + }; + /** + * @return {?} + */ + NgxFlowchartComponent.prototype.ngDoCheck = /** + * @return {?} + */ + function () { + if (this.model) { + /** @type {?} */ + var nodesChange = this.nodesDiffer.diff(this.model.nodes); + /** @type {?} */ + var edgesChange = this.edgesDiffer.diff(this.model.edges); + /** @type {?} */ + var nodesChanged_1 = false; + /** @type {?} */ + var edgesChanged_1 = false; + if (nodesChange !== null) { + nodesChange.forEachAddedItem((/** + * @return {?} + */ + function () { + nodesChanged_1 = true; + })); + nodesChange.forEachRemovedItem((/** + * @return {?} + */ + function () { + nodesChanged_1 = true; + })); + } + if (edgesChange !== null) { + edgesChange.forEachAddedItem((/** + * @return {?} + */ + function () { + edgesChanged_1 = true; + })); + edgesChange.forEachRemovedItem((/** + * @return {?} + */ + function () { + edgesChanged_1 = true; + })); + } + if (nodesChanged_1) { + this.adjustCanvasSize(true); + } + if (nodesChanged_1 || edgesChanged_1) { + this.cd.detectChanges(); + } + } + }; + /** + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.getEdgeDAttribute = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge), this.modelService.edges.destCoord(edge), this.edgeStyle); + }; + /** + * @param {?=} fit + * @return {?} + */ + NgxFlowchartComponent.prototype.adjustCanvasSize = /** + * @param {?=} fit + * @return {?} + */ + function (fit) { + var _this = this; + /** @type {?} */ + var maxX = 0; + /** @type {?} */ + var maxY = 0; + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + maxX = Math.max(node.x + _this.nodeWidth, maxX); + maxY = Math.max(node.y + _this.nodeHeight, maxY); + })); + /** @type {?} */ + var width; + /** @type {?} */ + var height; + if (fit) { + width = maxX; + height = maxY; + } + else { + width = Math.max(maxX, element.prop('offsetWidth')); + height = Math.max(maxY, element.prop('offsetHeight')); + } + element.css('width', width + 'px'); + element.css('height', height + 'px'); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.canvasClick = /** + * @param {?} event + * @return {?} + */ + function (event) { }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseDown = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + event.stopPropagation(); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeClick = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeRemove = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.modelService.edges.delete(edge); + event.stopPropagation(); + event.preventDefault(); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeEdit = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + if (this.userCallbacks.edgeEdit) { + this.userCallbacks.edgeEdit(event, edge); + } + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeDoubleClick = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + if (this.userCallbacks.edgeDoubleClick) { + this.userCallbacks.edgeDoubleClick(event, edge); + } + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseOver = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + if (this.userCallbacks.edgeMouseOver) { + this.userCallbacks.edgeMouseOver(event, edge); + } + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseEnter = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverService.edgeMouseEnter(event, edge); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseLeave = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverService.edgeMouseLeave(event, edge); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.nodeDraggingService.dragover(event); + this.edgeDraggingService.dragover(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (event.preventDefault) { + event.preventDefault(); + } + if (event.stopPropagation) { + event.stopPropagation(); + } + this.nodeDraggingService.drop(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.mousedown = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.rectangleSelectService.mousedown(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.mousemove = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.rectangleSelectService.mousemove(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.mouseup = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.rectangleSelectService.mouseup(event); }; NgxFlowchartComponent.decorators = [ { type: Component, args: [{ selector: 'fc-canvas', - template: "\n

\n ngx-flowchart works!\n

\n " + template: "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {{edgeDraggingService.edgeDragging.dragLabel}}\n
\n
\n \n
\n
\n \n
\n
\n ×\n
\n {{edge.label}}\n
\n
\n \n\n", + changeDetection: ChangeDetectionStrategy.OnPush, + styles: [":host{display:block;position:relative;width:100%;height:100%;background-size:25px 25px;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.1) 1px,transparent 1px);background-color:transparent;min-width:100%;min-height:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-canvas-container{display:block;position:relative;width:100%;height:100%}:host .fc-canvas-container svg.fc-canvas-svg{display:block;position:relative;width:100%;height:100%}:host .fc-edge{stroke:gray;stroke-width:4;transition:stroke-width .2s;fill:transparent}:host .fc-edge.fc-hover{stroke:gray;stroke-width:6;fill:transparent}:host .fc-edge.fc-selected{stroke:red;stroke-width:4;fill:transparent}:host .fc-edge.fc-active{-webkit-animation:3s linear infinite dash;animation:3s linear infinite dash;stroke-dasharray:20}:host .fc-edge.fc-dragging{pointer-events:none}:host .fc-arrow-marker polygon{stroke:gray;fill:gray}:host .fc-arrow-marker-selected polygon{stroke:red;fill:red}:host .edge-endpoint{fill:gray}:host .fc-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-edge-label{position:absolute;opacity:.8;transition:transform .2s;transform-origin:bottom left;margin:0 auto}:host .fc-edge-label .fc-edge-label-text{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;text-align:center;font-size:16px}:host .fc-edge-label .fc-edge-label-text span{cursor:default;border:solid #ff3d00;border-radius:10px;color:#ff3d00;background-color:#fff;padding:3px 5px}:host .fc-edge-label .fc-nodeedit{top:-30px;right:14px}:host .fc-edge-label .fc-nodedelete{top:-30px;right:-13px}:host .fc-edge-label.fc-hover{transform:scale(1.25)}:host .fc-edge-label.fc-edit .fc-edge-label-text span,:host .fc-edge-label.fc-selected .fc-edge-label-text span{border:solid red;color:#fff;font-weight:600;background-color:red}:host .fc-select-rectangle{border:2px dashed #5262ff;position:absolute;background:rgba(20,125,255,.1);z-index:2}@-webkit-keyframes dash{from{stroke-dashoffset:500}}@keyframes dash{from{stroke-dashoffset:500}}:host ::ng-deep .fc-nodeedit{display:none;font-size:15px}:host ::ng-deep .fc-nodedelete{display:none;font-size:18px}:host ::ng-deep .fc-edit .fc-nodedelete,:host ::ng-deep .fc-edit .fc-nodeedit{display:block;position:absolute;border:2px solid #eee;border-radius:50%;font-weight:600;line-height:20px;height:20px;padding-top:2px;width:22px;background:#494949;color:#fff;text-align:center;vertical-align:bottom;cursor:pointer}:host ::ng-deep .fc-edit .fc-nodeedit{top:-24px;right:16px}:host ::ng-deep .fc-edit .fc-nodedelete{top:-24px;right:-13px}"] }] } ]; /** @nocollapse */ - NgxFlowchartComponent.ctorParameters = function () { return []; }; + NgxFlowchartComponent.ctorParameters = function () { return [ + { type: ElementRef }, + { type: IterableDiffers }, + { type: FcModelValidationService }, + { type: FcEdgeDrawingService }, + { type: ChangeDetectorRef }, + { type: NgZone } + ]; }; + NgxFlowchartComponent.propDecorators = { + canvasClass: [{ type: HostBinding, args: ['attr.class',] }], + model: [{ type: Input }], + selectedObjects: [{ type: Input }], + edgeStyle: [{ type: Input }], + userCallbacks: [{ type: Input }], + automaticResize: [{ type: Input }], + dragAnimation: [{ type: Input }], + nodeWidth: [{ type: Input }], + nodeHeight: [{ type: Input }], + dropTargetId: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }], + mousemove: [{ type: HostListener, args: ['mousemove', ['$event'],] }], + mouseup: [{ type: HostListener, args: ['mouseup', ['$event'],] }] + }; return NgxFlowchartComponent; }()); export { NgxFlowchartComponent }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25neC1mbG93Y2hhcnQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBRWxEO0lBV0U7SUFBZ0IsQ0FBQzs7OztJQUVqQix3Q0FBUTs7O0lBQVI7SUFDQSxDQUFDOztnQkFkRixTQUFTLFNBQUM7b0JBQ1QsUUFBUSxFQUFFLFdBQVc7b0JBQ3JCLFFBQVEsRUFBRSxxREFJVDtpQkFFRjs7OztJQVFELDRCQUFDO0NBQUEsQUFoQkQsSUFnQkM7U0FQWSxxQkFBcUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIE9uSW5pdCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5AQ29tcG9uZW50KHtcbiAgc2VsZWN0b3I6ICdmYy1jYW52YXMnLFxuICB0ZW1wbGF0ZTogYFxuICAgIDxwPlxuICAgICAgbmd4LWZsb3djaGFydCB3b3JrcyFcbiAgICA8L3A+XG4gIGAsXG4gIHN0eWxlczogW11cbn0pXG5leHBvcnQgY2xhc3MgTmd4Rmxvd2NoYXJ0Q29tcG9uZW50IGltcGxlbWVudHMgT25Jbml0IHtcblxuICBjb25zdHJ1Y3RvcigpIHsgfVxuXG4gIG5nT25Jbml0KCkge1xuICB9XG5cbn1cbiJdfQ== \ No newline at end of file +if (false) { + /** @type {?} */ + NgxFlowchartComponent.prototype.model; + /** @type {?} */ + NgxFlowchartComponent.prototype.selectedObjects; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeStyle; + /** @type {?} */ + NgxFlowchartComponent.prototype.userCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.automaticResize; + /** @type {?} */ + NgxFlowchartComponent.prototype.dragAnimation; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeWidth; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeHeight; + /** @type {?} */ + NgxFlowchartComponent.prototype.dropTargetId; + /** @type {?} */ + NgxFlowchartComponent.prototype.callbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.userNodeCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.modelService; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.mouseoverService; + /** @type {?} */ + NgxFlowchartComponent.prototype.rectangleSelectService; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefId; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefIdSelected; + /** @type {?} */ + NgxFlowchartComponent.prototype.flowchartConstants; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.nodesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.edgesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.differs; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.modelValidation; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.cd; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.zone; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25neC1mbG93Y2hhcnQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUFFLGlCQUFpQixFQUMxQyxTQUFTLEVBRVQsVUFBVSxFQUNWLFdBQVcsRUFDWCxZQUFZLEVBQ1osS0FBSyxFQUVMLGVBQWUsRUFDZixNQUFNLEVBRVAsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUF3QyxrQkFBa0IsRUFBb0MsTUFBTSx3QkFBd0IsQ0FBQztBQUNwSSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDakQsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDckUsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDOUQsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDekQsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFFckU7SUErREUsK0JBQW9CLFVBQW1DLEVBQ25DLE9BQXdCLEVBQ3hCLGVBQXlDLEVBQzFDLGtCQUF3QyxFQUN2QyxFQUFxQixFQUNyQixJQUFZO1FBTFosZUFBVS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Ck7XG4gIH1cblxufVxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/ngx-flowchart.models.js b/dist/ngx-flowchart/esm5/lib/ngx-flowchart.models.js new file mode 100644 index 0000000..2835113 --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/ngx-flowchart.models.js @@ -0,0 +1,341 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import * as tslib_1 from "tslib"; +import { InjectionToken } from '@angular/core'; +/** @type {?} */ +export var FC_NODE_COMPONENT_CONFIG = new InjectionToken('fc-node.component.config'); +/** + * @record + */ +export function FcNodeComponentConfig() { } +if (false) { + /** @type {?} */ + FcNodeComponentConfig.prototype.nodeComponentType; +} +/** @type {?} */ +var htmlPrefix = 'fc'; +/** @type {?} */ +var leftConnectorType = 'leftConnector'; +/** @type {?} */ +var rightConnectorType = 'rightConnector'; +/** @type {?} */ +export var FlowchartConstants = { + htmlPrefix: htmlPrefix, + leftConnectorType: leftConnectorType, + rightConnectorType: rightConnectorType, + curvedStyle: 'curved', + lineStyle: 'line', + dragAnimationRepaint: 'repaint', + dragAnimationShadow: 'shadow', + canvasClass: htmlPrefix + '-canvas', + selectedClass: htmlPrefix + '-selected', + editClass: htmlPrefix + '-edit', + activeClass: htmlPrefix + '-active', + hoverClass: htmlPrefix + '-hover', + draggingClass: htmlPrefix + '-dragging', + edgeClass: htmlPrefix + '-edge', + edgeLabelClass: htmlPrefix + '-edge-label', + connectorClass: htmlPrefix + '-connector', + magnetClass: htmlPrefix + '-magnet', + nodeClass: htmlPrefix + '-node', + nodeOverlayClass: htmlPrefix + '-node-overlay', + leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's', + rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's', + canvasResizeThreshold: 200, + canvasResizeStep: 200 +}; +/** + * @record + */ +export function FcCoords() { } +if (false) { + /** @type {?|undefined} */ + FcCoords.prototype.x; + /** @type {?|undefined} */ + FcCoords.prototype.y; +} +/** + * @record + */ +export function FcOffset() { } +if (false) { + /** @type {?} */ + FcOffset.prototype.top; + /** @type {?} */ + FcOffset.prototype.left; +} +/** + * @record + */ +export function FcRectBox() { } +if (false) { + /** @type {?} */ + FcRectBox.prototype.top; + /** @type {?} */ + FcRectBox.prototype.left; + /** @type {?} */ + FcRectBox.prototype.right; + /** @type {?} */ + FcRectBox.prototype.bottom; +} +/** + * @record + */ +export function FcConnector() { } +if (false) { + /** @type {?} */ + FcConnector.prototype.id; + /** @type {?} */ + FcConnector.prototype.type; +} +/** + * @record + */ +export function FcNode() { } +if (false) { + /** @type {?} */ + FcNode.prototype.id; + /** @type {?} */ + FcNode.prototype.name; + /** @type {?} */ + FcNode.prototype.connectors; + /** @type {?|undefined} */ + FcNode.prototype.readonly; + /* Skipping unhandled member: [key: string]: any;*/ +} +/** + * @record + */ +export function FcEdge() { } +if (false) { + /** @type {?|undefined} */ + FcEdge.prototype.label; + /** @type {?|undefined} */ + FcEdge.prototype.source; + /** @type {?|undefined} */ + FcEdge.prototype.destination; + /** @type {?|undefined} */ + FcEdge.prototype.active; +} +/** + * @record + */ +export function FcItemInfo() { } +if (false) { + /** @type {?|undefined} */ + FcItemInfo.prototype.node; + /** @type {?|undefined} */ + FcItemInfo.prototype.edge; +} +/** + * @record + */ +export function FcModel() { } +if (false) { + /** @type {?} */ + FcModel.prototype.nodes; + /** @type {?} */ + FcModel.prototype.edges; +} +/** + * @record + */ +export function UserCallbacks() { } +if (false) { + /** @type {?|undefined} */ + UserCallbacks.prototype.dropNode; + /** @type {?|undefined} */ + UserCallbacks.prototype.createEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeAdded; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeDoubleClick; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeMouseOver; + /** @type {?|undefined} */ + UserCallbacks.prototype.isValidEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeEdit; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeCallbacks; +} +/** + * @record + */ +export function UserNodeCallbacks() { } +if (false) { + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.nodeEdit; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.doubleClick; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseDown; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseEnter; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseLeave; +} +/** + * @record + */ +export function FcCallbacks() { } +if (false) { + /** @type {?} */ + FcCallbacks.prototype.nodeDragstart; + /** @type {?} */ + FcCallbacks.prototype.nodeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDragstart; + /** @type {?} */ + FcCallbacks.prototype.edgeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDrop; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverConnector; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverMagnet; + /** @type {?} */ + FcCallbacks.prototype.edgeDragleaveMagnet; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOver; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOut; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseEnter; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseLeave; + /** @type {?} */ + FcCallbacks.prototype.nodeClicked; +} +/** + * @record + */ +export function FcAdjacentList() { } +var ModelvalidationError = /** @class */ (function (_super) { + tslib_1.__extends(ModelvalidationError, _super); + function ModelvalidationError(message) { + return _super.call(this, message) || this; + } + return ModelvalidationError; +}(Error)); +export { ModelvalidationError }; +/** + * @param {?} graph + * @return {?} + */ +export function fcTopSort(graph) { + var e_1, _a, e_2, _b; + /** @type {?} */ + var adjacentList = {}; + graph.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + adjacentList[node.id] = { incoming: 0, outgoing: [] }; + })); + graph.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var sourceNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.id === edge.source; + })); + }))[0]; + /** @type {?} */ + var destinationNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.id === edge.destination; + })); + }))[0]; + adjacentList[sourceNode.id].outgoing.push(destinationNode.id); + adjacentList[destinationNode.id].incoming++; + })); + /** @type {?} */ + var orderedNodes = []; + /** @type {?} */ + var sourceNodes = []; + try { + for (var _c = tslib_1.__values(Object.keys(adjacentList)), _d = _c.next(); !_d.done; _d = _c.next()) { + var node = _d.value; + /** @type {?} */ + var edges = adjacentList[node]; + if (edges.incoming === 0) { + sourceNodes.push(node); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_1) throw e_1.error; } + } + while (sourceNodes.length !== 0) { + /** @type {?} */ + var sourceNode = sourceNodes.pop(); + for (var i = 0; i < adjacentList[sourceNode].outgoing.length; i++) { + /** @type {?} */ + var destinationNode = adjacentList[sourceNode].outgoing[i]; + adjacentList[destinationNode].incoming--; + if (adjacentList[destinationNode].incoming === 0) { + sourceNodes.push(destinationNode); + } + adjacentList[sourceNode].outgoing.splice(i, 1); + i--; + } + orderedNodes.push(sourceNode); + } + /** @type {?} */ + var hasEdges = false; + try { + for (var _e = tslib_1.__values(Object.keys(adjacentList)), _f = _e.next(); !_f.done; _f = _e.next()) { + var node = _f.value; + /** @type {?} */ + var edges = adjacentList[node]; + if (edges.incoming !== 0) { + hasEdges = true; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_2) throw e_2.error; } + } + if (hasEdges) { + return null; + } + else { + return orderedNodes; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5tb2RlbHMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25neC1mbG93Y2hhcnQubW9kZWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ0EsT0FBTyxFQUFFLGNBQWMsRUFBUSxNQUFNLGVBQWUsQ0FBQzs7QUFHckQsTUFBTSxLQUFPLHdCQUF3QixHQUFHLElBQUksY0FBYyxDQUF3QiwwQkFBMEIsQ0FBQzs7OztBQUU3RywyQ0FFQzs7O0lBREMsa0RBQXlDOzs7SUFHckMsVUFBVSxHQUFHLElBQUk7O0lBQ2pCLGlCQUFpQixHQUFHLGVBQWU7O0lBQ25DLGtCQUFrQixHQUFHLGdCQUFnQjs7QUFFM0MsTUFBTSxLQUFPLGtCQUFrQixHQUFHO0lBQ2hDLFVBQVUsWUFBQTtJQUNWLGlCQUFpQixtQkFBQTtJQUNqQixrQkFBa0Isb0JBQUE7SUFDbEIsV0FBVyxFQUFFLFFBQVE7SUFDckIsU0FBUyxFQUFFLE1BQU07SUFDakIsb0JBQW9CLEVBQUUsU0FBUztJQUMvQixtQkFBbUIsRUFBRSxRQUFRO0lBQzdCLFdBQVcsRUFBRSxVQUFVLEdBQUcsU0FBUztJQUNuQyxhQUFhLEVBQUUsVUFBVSxHQUFHLFdBQVc7SUFDdkMsU0FBUyxFQUFFLFVBQVUsR0FBRyxPQUFPO0lBQy9CLFdBQVcsRUFBRSxVQUFVLEdBQUcsU0FBUztJQUNuQyxVQUFVLEVBQUUsVUFBVSxHQUFHLFFBQVE7SUFDakMsYUFBYSxFQUFFLFVBQVUsR0FBRyxXQUFXO0lBQ3ZDLFNBQVMsRUFBR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cy5wdXNoKGRlc3RpbmF0aW9uTm9kZSk7XG4gICAgICB9XG4gICAgICBhZGphY2VudExpc3Rbc291cmNlTm9kZV0ub3V0Z29pbmcuc3BsaWNlKGksIDEpO1xuICAgICAgaS0tO1xuICAgIH1cbiAgICBvcmRlcmVkTm9kZXMucHVzaChzb3VyY2VOb2RlKTtcbiAgfVxuICBsZXQgaGFzRWRnZXMgPSBmYWxzZTtcbiAgZm9yIChjb25zdCBub2RlIG9mIE9iamVjdC5rZXlzKGFkamFjZW50TGlzdCkpIHtcbiAgICBjb25zdCBlZGdlcyA9IGFkamFjZW50TGlzdFtub2RlXTtcbiAgICBpZiAoZWRnZXMuaW5jb21pbmcgIT09IDApIHtcbiAgICAgIGhhc0VkZ2VzID0gdHJ1ZTtcbiAgICB9XG4gIH1cbiAgaWYgKGhhc0VkZ2VzKSB7XG4gICAgcmV0dXJuIG51bGw7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIG9yZGVyZWROb2RlcztcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/ngx-flowchart.module.js b/dist/ngx-flowchart/esm5/lib/ngx-flowchart.module.js index d05cee1..edaa3a6 100644 --- a/dist/ngx-flowchart/esm5/lib/ngx-flowchart.module.js +++ b/dist/ngx-flowchart/esm5/lib/ngx-flowchart.module.js @@ -4,17 +4,49 @@ */ import { NgModule } from '@angular/core'; import { NgxFlowchartComponent } from './ngx-flowchart.component'; +import { FcModelValidationService } from './modelvalidation.service'; +import { FcEdgeDrawingService } from './edge-drawing.service'; +import { CommonModule } from '@angular/common'; +import { FcMagnetDirective } from './magnet.directive'; +import { FcConnectorDirective } from './connector.directive'; +import { FcNodeContainerComponent } from './node.component'; +import { FC_NODE_COMPONENT_CONFIG } from './ngx-flowchart.models'; +import { DefaultFcNodeComponent } from './default-node.component'; +var ɵ0 = { + nodeComponentType: DefaultFcNodeComponent +}; var NgxFlowchartModule = /** @class */ (function () { function NgxFlowchartModule() { } NgxFlowchartModule.decorators = [ { type: NgModule, args: [{ - declarations: [NgxFlowchartComponent], - imports: [], - exports: [NgxFlowchartComponent] + entryComponents: [ + DefaultFcNodeComponent + ], + declarations: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + FcNodeContainerComponent, + DefaultFcNodeComponent], + providers: [ + FcModelValidationService, + FcEdgeDrawingService, + { + provide: FC_NODE_COMPONENT_CONFIG, + useValue: ɵ0 + } + ], + imports: [ + CommonModule + ], + exports: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + DefaultFcNodeComponent] },] } ]; return NgxFlowchartModule; }()); export { NgxFlowchartModule }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25neC1mbG93Y2hhcnQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBRWxFO0lBQUE7SUFNa0MsQ0FBQzs7Z0JBTmxDLFFBQVEsU0FBQztvQkFDUixZQUFZLEVBQUUsQ0FBQyxxQkFBcUIsQ0FBQztvQkFDckMsT0FBTyxFQUFFLEVBQ1I7b0JBQ0QsT0FBTyxFQUFFLENBQUMscUJBQXFCLENBQUM7aUJBQ2pDOztJQUNpQyx5QkFBQztDQUFBLEFBTm5DLElBTW1DO1NBQXRCLGtCQUFrQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBOZ3hGbG93Y2hhcnRDb21wb25lbnQgfSBmcm9tICc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XSxcbiAgZXhwb3J0czogW05neEZsb3djaGFydENvbXBvbmVudCxcbiAgICBGY01hZ25ldERpcmVjdGl2ZSxcbiAgICBGY0Nvbm5lY3RvckRpcmVjdGl2ZSxcbiAgICBEZWZhdWx0RmNOb2RlQ29tcG9uZW50XVxufSlcbmV4cG9ydCBjbGFzcyBOZ3hGbG93Y2hhcnRNb2R1bGUgeyB9XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/ngx-flowchart.service.js b/dist/ngx-flowchart/esm5/lib/ngx-flowchart.service.js deleted file mode 100644 index 142ba65..0000000 --- a/dist/ngx-flowchart/esm5/lib/ngx-flowchart.service.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @fileoverview added by tsickle - * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc - */ -import { Injectable } from '@angular/core'; -import * as i0 from "@angular/core"; -var NgxFlowchartService = /** @class */ (function () { - function NgxFlowchartService() { - } - NgxFlowchartService.decorators = [ - { type: Injectable, args: [{ - providedIn: 'root' - },] } - ]; - /** @nocollapse */ - NgxFlowchartService.ctorParameters = function () { return []; }; - /** @nocollapse */ NgxFlowchartService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function NgxFlowchartService_Factory() { return new NgxFlowchartService(); }, token: NgxFlowchartService, providedIn: "root" }); - return NgxFlowchartService; -}()); -export { NgxFlowchartService }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZsb3djaGFydC8iLCJzb3VyY2VzIjpbImxpYi9uZ3gtZmxvd2NoYXJ0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBRTNDO0lBS0U7SUFBZ0IsQ0FBQzs7Z0JBTGxCLFVBQVUsU0FBQztvQkFDVixVQUFVLEVBQUUsTUFBTTtpQkFDbkI7Ozs7OzhCQUpEO0NBUUMsQUFORCxJQU1DO1NBSFksbUJBQW1CIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ASW5qZWN0YWJsZSh7XG4gIHByb3ZpZGVkSW46ICdyb290J1xufSlcbmV4cG9ydCBjbGFzcyBOZ3hGbG93Y2hhcnRTZXJ2aWNlIHtcblxuICBjb25zdHJ1Y3RvcigpIHsgfVxufVxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/node-dragging.service.js b/dist/ngx-flowchart/esm5/lib/node-dragging.service.js new file mode 100644 index 0000000..ec180ac --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/node-dragging.service.js @@ -0,0 +1,530 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import * as tslib_1 from "tslib"; +import { FlowchartConstants } from './ngx-flowchart.models'; +/** @type {?} */ +var nodeDropScope = { + dropElement: null +}; +var FcNodeDraggingService = /** @class */ (function () { + function FcNodeDraggingService(modelService, applyFunction, automaticResize, dragAnimation) { + this.nodeDraggingScope = { + shadowDragStarted: false, + dropElement: null, + draggedNodes: [], + shadowElements: [] + }; + this.dragOffsets = []; + this.draggedElements = []; + this.destinationHtmlElements = []; + this.oldDisplayStyles = []; + this.modelService = modelService; + this.automaticResize = automaticResize; + this.dragAnimation = dragAnimation; + this.applyFunction = applyFunction; + } + /** + * @private + * @param {?} coordinate + * @param {?} max + * @return {?} + */ + FcNodeDraggingService.prototype.getCoordinate = /** + * @private + * @param {?} coordinate + * @param {?} max + * @return {?} + */ + function (coordinate, max) { + coordinate = Math.max(coordinate, 0); + coordinate = Math.min(coordinate, max); + return coordinate; + }; + /** + * @private + * @param {?} x + * @return {?} + */ + FcNodeDraggingService.prototype.getXCoordinate = /** + * @private + * @param {?} x + * @return {?} + */ + function (x) { + return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth); + }; + /** + * @private + * @param {?} y + * @return {?} + */ + FcNodeDraggingService.prototype.getYCoordinate = /** + * @private + * @param {?} y + * @return {?} + */ + function (y) { + return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight); + }; + /** + * @private + * @param {?} draggedNode + * @param {?} nodeElement + * @return {?} + */ + FcNodeDraggingService.prototype.resizeCanvas = /** + * @private + * @param {?} draggedNode + * @param {?} nodeElement + * @return {?} + */ + function (draggedNode, nodeElement) { + if (this.automaticResize && !this.modelService.isDropSource()) { + /** @type {?} */ + var canvasElement = this.modelService.canvasHtmlElement; + if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px'; + } + if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px'; + } + } + }; + /** + * @param {?} node + * @return {?} + */ + FcNodeDraggingService.prototype.isDraggingNode = /** + * @param {?} node + * @return {?} + */ + function (node) { + return this.nodeDraggingScope.draggedNodes.includes(node); + }; + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + FcNodeDraggingService.prototype.dragstart = /** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + var e_1, _a, e_2, _b; + if (node.readonly) { + return; + } + this.dragOffsets.length = 0; + this.draggedElements.length = 0; + this.nodeDraggingScope.draggedNodes.length = 0; + this.nodeDraggingScope.shadowElements.length = 0; + this.destinationHtmlElements.length = 0; + this.oldDisplayStyles.length = 0; + /** @type {?} */ + var elements = []; + /** @type {?} */ + var nodes = []; + if (this.modelService.nodes.isSelected(node)) { + /** @type {?} */ + var selectedNodes = this.modelService.nodes.getSelectedNodes(); + try { + for (var selectedNodes_1 = tslib_1.__values(selectedNodes), selectedNodes_1_1 = selectedNodes_1.next(); !selectedNodes_1_1.done; selectedNodes_1_1 = selectedNodes_1.next()) { + var selectedNode = selectedNodes_1_1.value; + /** @type {?} */ + var element = $(this.modelService.nodes.getHtmlElement(selectedNode.id)); + elements.push(element); + nodes.push(selectedNode); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (selectedNodes_1_1 && !selectedNodes_1_1.done && (_a = selectedNodes_1.return)) _a.call(selectedNodes_1); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + elements.push($((/** @type {?} */ (event.target)))); + nodes.push(node); + } + /** @type {?} */ + var offsetsX = []; + /** @type {?} */ + var offsetsY = []; + try { + for (var elements_1 = tslib_1.__values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) { + var element = elements_1_1.value; + offsetsX.push(parseInt(element.css('left'), 10) - event.clientX); + offsetsY.push(parseInt(element.css('top'), 10) - event.clientY); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (elements_1_1 && !elements_1_1.done && (_b = elements_1.return)) _b.call(elements_1); + } + finally { if (e_2) throw e_2.error; } + } + /** @type {?} */ + var originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + if (this.modelService.isDropSource()) { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + nodeDropScope.dropElement = (/** @type {?} */ (elements[0][0].cloneNode(true))); + /** @type {?} */ + var offset = $(this.modelService.canvasHtmlElement).offset(); + nodeDropScope.dropElement.offsetInfo = { + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + nodeDropScope.dropElement.style.position = 'absolute'; + nodeDropScope.dropElement.style.pointerEvents = 'none'; + nodeDropScope.dropElement.style.zIndex = '9999'; + document.body.appendChild(nodeDropScope.dropElement); + /** @type {?} */ + var dropNodeInfo = { + node: node, + dropTargetId: this.modelService.dropTargetId, + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo)); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + /** @type {?} */ + var target = (/** @type {?} */ (event.target)); + this.destinationHtmlElements.push(target); + this.oldDisplayStyles.push(target.style.display); + target.style.display = 'none'; + this.nodeDraggingScope.shadowDragStarted = true; + } + return; + } + this.nodeDraggingScope.draggedNodes = nodes; + for (var i = 0; i < elements.length; i++) { + this.draggedElements.push(elements[i][0]); + this.dragOffsets.push({ + x: offsetsX[i], + y: offsetsY[i] + }); + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + for (var i = 0; i < this.draggedElements.length; i++) { + /** @type {?} */ + var dragOffset = this.dragOffsets[i]; + /** @type {?} */ + var draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var shadowElement = $("
") + + ("

" + draggedNode.name + "

")); + /** @type {?} */ + var targetInnerNode = $(this.draggedElements[i]).children()[0]; + shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor; + this.nodeDraggingScope.shadowElements.push(shadowElement); + this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]); + } + } + originalEvent.dataTransfer.setData('text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + for (var i = 0; i < this.draggedElements.length; i++) { + this.destinationHtmlElements.push(this.draggedElements[i]); + this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); + this.destinationHtmlElements[i].style.display = 'none'; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.nodeDraggingScope.shadowDragStarted = true; + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeDraggingService.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (this.modelService.isDropSource()) { + event.preventDefault(); + return false; + } + /** @type {?} */ + var dropNode = null; + /** @type {?} */ + var originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + /** @type {?} */ + var infoText = originalEvent.dataTransfer.getData('text'); + if (infoText) { + /** @type {?} */ + var dropNodeInfo = null; + try { + dropNodeInfo = JSON.parse(infoText); + } + catch (e) { } + if (dropNodeInfo && dropNodeInfo.dropTargetId) { + if (this.modelService.canvasHtmlElement.id && + this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) { + dropNode = dropNodeInfo.node; + /** @type {?} */ + var offset = $(this.modelService.canvasHtmlElement).offset(); + /** @type {?} */ + var x = event.clientX - offset.left; + /** @type {?} */ + var y = event.clientY - offset.top; + dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x)); + dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y)); + } + } + } + if (dropNode) { + this.modelService.dropNode(event, dropNode); + event.preventDefault(); + return false; + } + else if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + function () { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = _this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var dragOffset = _this.dragOffsets[i]; + draggedNode.x = Math.round(_this.getXCoordinate(dragOffset.x + event.clientX)); + draggedNode.y = Math.round(_this.getYCoordinate(dragOffset.y + event.clientY)); + } + event.preventDefault(); + return false; + })); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeDraggingService.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (nodeDropScope.dropElement) { + /** @type {?} */ + var offsetInfo = nodeDropScope.dropElement.offsetInfo; + nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px'; + nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px'; + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + function () { + _this.destinationHtmlElements[0].style.display = _this.oldDisplayStyles[0]; + _this.nodeDraggingScope.shadowDragStarted = false; + })); + } + event.preventDefault(); + return; + } + if (this.modelService.isDropSource()) { + event.preventDefault(); + return; + } + if (!this.nodeDraggingScope.draggedNodes.length) { + event.preventDefault(); + return; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + function () { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = _this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var dragOffset = _this.dragOffsets[i]; + draggedNode.x = _this.getXCoordinate(dragOffset.x + event.clientX); + draggedNode.y = _this.getYCoordinate(dragOffset.y + event.clientY); + _this.resizeCanvas(draggedNode, _this.draggedElements[i]); + } + event.preventDefault(); + return false; + })); + } + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.nodeDraggingScope.draggedNodes.length) { + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + function () { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + _this.destinationHtmlElements[i].style.display = _this.oldDisplayStyles[i]; + } + _this.nodeDraggingScope.shadowDragStarted = false; + })); + } + for (var i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var dragOffset = this.dragOffsets[i]; + this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px'); + this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px'); + this.resizeCanvas(draggedNode, this.draggedElements[i]); + } + event.preventDefault(); + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeDraggingService.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + this.applyFunction((/** + * @return {?} + */ + function () { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + if (_this.modelService.isDropSource()) { + return; + } + if (_this.nodeDraggingScope.shadowElements.length) { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = _this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var shadowElement = _this.nodeDraggingScope.shadowElements[i]; + draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10); + draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10); + _this.modelService.canvasHtmlElement.removeChild(shadowElement[0]); + } + _this.nodeDraggingScope.shadowElements.length = 0; + } + if (_this.nodeDraggingScope.draggedNodes.length) { + _this.nodeDraggingScope.draggedNodes.length = 0; + _this.draggedElements.length = 0; + _this.dragOffsets.length = 0; + } + })); + }; + return FcNodeDraggingService; +}()); +export { FcNodeDraggingService }; +if (false) { + /** @type {?} */ + FcNodeDraggingService.prototype.nodeDraggingScope; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragOffsets; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.draggedElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.destinationHtmlElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.oldDisplayStyles; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.automaticResize; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.applyFunction; +} +/** + * @record + */ +export function NodeDraggingScope() { } +if (false) { + /** @type {?} */ + NodeDraggingScope.prototype.draggedNodes; + /** @type {?} */ + NodeDraggingScope.prototype.shadowElements; + /** @type {?} */ + NodeDraggingScope.prototype.shadowDragStarted; + /** @type {?} */ + NodeDraggingScope.prototype.dropElement; +} +/** + * @record + */ +export function NodeDropElement() { } +if (false) { + /** @type {?|undefined} */ + NodeDropElement.prototype.offsetInfo; +} +/** + * @record + */ +export function NodeDropScope() { } +if (false) { + /** @type {?} */ + NodeDropScope.prototype.dropElement; +} +/** + * @record + */ +export function DropNodeInfo() { } +if (false) { + /** @type {?} */ + DropNodeInfo.prototype.node; + /** @type {?} */ + DropNodeInfo.prototype.dropTargetId; + /** @type {?} */ + DropNodeInfo.prototype.offsetX; + /** @type {?} */ + DropNodeInfo.prototype.offsetY; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS1kcmFnZ2luZy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZsb3djaGFydC8iLCJzb3VyY2VzIjpbImxpYi9ub2RlLWRyYWdnaW5nLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDQSxPQUFPLEVBQW9CLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7O0lBRXhFLGFBQWEsR0FBa0I7SUFDbkMsV0FBVyxFQUFFLElBQUk7Q0FDbEI7QUFFRDtJQW9CRSwrQkFBWSxZQUE0QixFQUM1QixhQUFrRCxFQUNsRCxlQUF3QixFQUFFLGFBQXFCO1FBcEIzRCxzQkFBaUIsR0FBc0I7WUFDckMsaUJBQWlCLEVBQUUsS0FBSztZQUN4QixXQUFXLEVBQUUsSUFBSTtZQUNqQixZQUFZLEVBQUUsRUFBRTtZQUNoQixjQUFjLEVBQUUsRUFBRTtTQUNuQixDQUFDO1FBRU0sZ0JBQVcsR0FBZSxFQUFFLENBQUM7UUFDN0Isb0JBQWUsR0FBa0IsRUFBRSxDQUFDO1FBRXBDLD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iZXI7XG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/node.component.js b/dist/ngx-flowchart/esm5/lib/node.component.js new file mode 100644 index 0000000..6d1fb86 --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/node.component.js @@ -0,0 +1,387 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import * as tslib_1 from "tslib"; +import { Component, ComponentFactoryResolver, ElementRef, HostBinding, HostListener, Inject, Input, ViewChild, ViewContainerRef } from '@angular/core'; +import { FC_NODE_COMPONENT_CONFIG, FlowchartConstants } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +var FcNodeContainerComponent = /** @class */ (function () { + function FcNodeContainerComponent(nodeComponentConfig, elementRef, componentFactoryResolver) { + this.nodeComponentConfig = nodeComponentConfig; + this.elementRef = elementRef; + this.componentFactoryResolver = componentFactoryResolver; + } + Object.defineProperty(FcNodeContainerComponent.prototype, "nodeId", { + get: /** + * @return {?} + */ + function () { + return this.node.id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FcNodeContainerComponent.prototype, "top", { + get: /** + * @return {?} + */ + function () { + return this.node.y + 'px'; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FcNodeContainerComponent.prototype, "left", { + get: /** + * @return {?} + */ + function () { + return this.node.x + 'px'; + }, + enumerable: true, + configurable: true + }); + /** + * @return {?} + */ + FcNodeContainerComponent.prototype.ngOnInit = /** + * @return {?} + */ + function () { + if (!this.userNodeCallbacks) { + this.userNodeCallbacks = {}; + } + this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || ((/** + * @return {?} + */ + function () { })); + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.nodeClass); + if (!this.node.readonly) { + element.attr('draggable', 'true'); + } + this.updateNodeClass(); + this.modelservice.nodes.setHtmlElement(this.node.id, element[0]); + this.nodeContentContainer.clear(); + /** @type {?} */ + var componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType); + /** @type {?} */ + var componentRef = this.nodeContentContainer.createComponent(componentFactory); + this.nodeComponent = componentRef.instance; + this.nodeComponent.callbacks = this.callbacks; + this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks; + this.nodeComponent.node = this.node; + this.nodeComponent.modelservice = this.modelservice; + this.updateNodeComponent(); + }; + /** + * @param {?} changes + * @return {?} + */ + FcNodeContainerComponent.prototype.ngOnChanges = /** + * @param {?} changes + * @return {?} + */ + function (changes) { + var e_1, _a; + /** @type {?} */ + var updateNode = false; + try { + for (var _b = tslib_1.__values(Object.keys(changes)), _c = _b.next(); !_c.done; _c = _b.next()) { + var propName = _c.value; + /** @type {?} */ + var change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) { + updateNode = true; + } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (updateNode) { + this.updateNodeClass(); + this.updateNodeComponent(); + } + }; + /** + * @private + * @return {?} + */ + FcNodeContainerComponent.prototype.updateNodeClass = /** + * @private + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + this.toggleClass(element, FlowchartConstants.selectedClass, this.selected); + this.toggleClass(element, FlowchartConstants.editClass, this.edit); + this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse); + this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging); + }; + /** + * @private + * @return {?} + */ + FcNodeContainerComponent.prototype.updateNodeComponent = /** + * @private + * @return {?} + */ + function () { + this.nodeComponent.selected = this.selected; + this.nodeComponent.edit = this.edit; + this.nodeComponent.underMouse = this.underMouse; + this.nodeComponent.mouseOverConnector = this.mouseOverConnector; + this.nodeComponent.dragging = this.dragging; + }; + /** + * @private + * @param {?} element + * @param {?} clazz + * @param {?} set + * @return {?} + */ + FcNodeContainerComponent.prototype.toggleClass = /** + * @private + * @param {?} element + * @param {?} clazz + * @param {?} set + * @return {?} + */ + function (element, clazz, set) { + if (set) { + element.addClass(clazz); + } + else { + element.removeClass(clazz); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.mousedown = /** + * @param {?} event + * @return {?} + */ + function (event) { + event.stopPropagation(); + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.dragstart = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeDragstart(event, this.node); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeDragend(event); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.click = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeClicked(event, this.node); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.mouseover = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOver(event, this.node); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.mouseout = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOut(event, this.node); + } + }; + FcNodeContainerComponent.decorators = [ + { type: Component, args: [{ + selector: 'fc-node', + template: '', + styles: [":host{position:absolute;z-index:1}:host.fc-dragging{z-index:10}:host ::ng-deep .fc-leftConnectors,:host ::ng-deep .fc-rightConnectors{position:absolute;top:0;height:100%;display:flex;flex-direction:column;z-index:-10}:host ::ng-deep .fc-leftConnectors .fc-magnet,:host ::ng-deep .fc-rightConnectors .fc-magnet{align-items:center}:host ::ng-deep .fc-leftConnectors{left:-20px}:host ::ng-deep .fc-rightConnectors{right:-20px}:host ::ng-deep .fc-magnet{display:flex;flex-grow:1;height:60px;justify-content:center}:host ::ng-deep .fc-connector{width:18px;height:18px;border:10px solid transparent;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box;border-radius:50%;background-color:#f7a789;color:#fff;pointer-events:all}:host ::ng-deep .fc-connector.fc-hover{background-color:#000}"] + }] } + ]; + /** @nocollapse */ + FcNodeContainerComponent.ctorParameters = function () { return [ + { type: undefined, decorators: [{ type: Inject, args: [FC_NODE_COMPONENT_CONFIG,] }] }, + { type: ElementRef }, + { type: ComponentFactoryResolver } + ]; }; + FcNodeContainerComponent.propDecorators = { + callbacks: [{ type: Input }], + userNodeCallbacks: [{ type: Input }], + node: [{ type: Input }], + selected: [{ type: Input }], + edit: [{ type: Input }], + underMouse: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + modelservice: [{ type: Input }], + dragging: [{ type: Input }], + nodeId: [{ type: HostBinding, args: ['attr.id',] }], + top: [{ type: HostBinding, args: ['style.top',] }], + left: [{ type: HostBinding, args: ['style.left',] }], + nodeContentContainer: [{ type: ViewChild, args: ['nodeContent', { read: ViewContainerRef, static: true },] }], + mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }], + dragstart: [{ type: HostListener, args: ['dragstart', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }], + click: [{ type: HostListener, args: ['click', ['$event'],] }], + mouseover: [{ type: HostListener, args: ['mouseover', ['$event'],] }], + mouseout: [{ type: HostListener, args: ['mouseout', ['$event'],] }] + }; + return FcNodeContainerComponent; +}()); +export { FcNodeContainerComponent }; +if (false) { + /** @type {?} */ + FcNodeContainerComponent.prototype.callbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.node; + /** @type {?} */ + FcNodeContainerComponent.prototype.selected; + /** @type {?} */ + FcNodeContainerComponent.prototype.edit; + /** @type {?} */ + FcNodeContainerComponent.prototype.underMouse; + /** @type {?} */ + FcNodeContainerComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeContainerComponent.prototype.modelservice; + /** @type {?} */ + FcNodeContainerComponent.prototype.dragging; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeComponent; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeContentContainer; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.nodeComponentConfig; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.componentFactoryResolver; +} +/** + * @abstract + */ +var FcNodeComponent = /** @class */ (function () { + function FcNodeComponent() { + this.flowchartConstants = FlowchartConstants; + } + /** + * @return {?} + */ + FcNodeComponent.prototype.ngOnInit = /** + * @return {?} + */ + function () { + }; + FcNodeComponent.propDecorators = { + callbacks: [{ type: Input }], + userNodeCallbacks: [{ type: Input }], + node: [{ type: Input }], + selected: [{ type: Input }], + edit: [{ type: Input }], + underMouse: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + modelservice: [{ type: Input }], + dragging: [{ type: Input }] + }; + return FcNodeComponent; +}()); +export { FcNodeComponent }; +if (false) { + /** @type {?} */ + FcNodeComponent.prototype.callbacks; + /** @type {?} */ + FcNodeComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeComponent.prototype.node; + /** @type {?} */ + FcNodeComponent.prototype.selected; + /** @type {?} */ + FcNodeComponent.prototype.edit; + /** @type {?} */ + FcNodeComponent.prototype.underMouse; + /** @type {?} */ + FcNodeComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeComponent.prototype.modelservice; + /** @type {?} */ + FcNodeComponent.prototype.dragging; + /** @type {?} */ + FcNodeComponent.prototype.flowchartConstants; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL25vZGUuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCx3QkFBd0IsRUFDeEIsVUFBVSxFQUFFLFdBQVcsRUFDdkIsWUFBWSxFQUNaLE1BQU0sRUFDTixLQUFLLEVBSUwsU0FBUyxFQUNULGdCQUFnQixFQUNqQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQ0wsd0JBQXdCLEVBS3hCLGtCQUFrQixFQUVuQixNQUFNLHdCQUF3QixDQUFDO0FBQ2hDLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUVqRDtJQXFERSxrQ0FBc0QsbUJBQTBDLEVBQzVFLFVBQW1DLEVBQ25DLHdCQUFrRDtRQUZoQix3QkFBbUIsR0FBbkIsbUJBQW1CLENBQXVCO1FBQzVFLGVBQVUsR0FBVixVQUFVLENBQXlCO1FBQ25DLDZCQUF3QixHQUF4Qix3QkFBd0IsQ0FBMEI7SUFDdEUsQ0FBQztJQXRCRCxzQkFDSSw0Q0FBTTs7OztRQURWO1lBRUUsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQztRQUN0QixDQUFDOzs7T0FBQTtJQUVELHNCQUNJLHlDQUFHOzs7O1FBRFA7WUFFRSxPQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEl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uICAgIGlmICghdGhpcy5ub2RlLnJlYWRvbmx5KSB7XG4gICAgICB0aGlzLmNhbGxiYWNrcy5ub2RlTW91c2VPdmVyKGV2ZW50LCB0aGlzLm5vZGUpO1xuICAgIH1cbiAgfVxuXG4gIEBIb3N0TGlzdGVuZXIoJ21vdXNlb3V0JywgWyckZXZlbnQnXSlcbiAgbW91c2VvdXQoZXZlbnQ6IE1vdXNlRXZlbnQpIHtcbiAgICBpZiAoIXRoaXMubm9kZS5yZWFkb25seSkge1xuICAgICAgdGhpcy5jYWxsYmFja3Mubm9kZU1vdXNlT3V0KGV2ZW50LCB0aGlzLm5vZGUpO1xuICAgIH1cbiAgfVxuXG59XG5cbmV4cG9ydCBhYnN0cmFjdCBjbGFzcyBGY05vZGVDb21wb25lbnQgaW1wbGVtZW50cyBPbkluaXQge1xuXG4gIEBJbnB1dCgpXG4gIGNhbGxiYWNrczogRmNDYWxsYmFja3M7XG5cbiAgQElucHV0KClcbiAgdXNlck5vZGVDYWxsYmFja3M6IFVzZXJOb2RlQ2FsbGJhY2tzO1xuXG4gIEBJbnB1dCgpXG4gIG5vZGU6IEZjTm9kZTtcblxuICBASW5wdXQoKVxuICBzZWxlY3RlZDogYm9vbGVhbjtcblxuICBASW5wdXQoKVxuICBlZGl0OiBib29sZWFuO1xuXG4gIEBJbnB1dCgpXG4gIHVuZGVyTW91c2U6IGJvb2xlYW47XG5cbiAgQElucHV0KClcbiAgbW91c2VPdmVyQ29ubmVjdG9yOiBGY0Nvbm5lY3RvcjtcblxuICBASW5wdXQoKVxuICBtb2RlbHNlcnZpY2U6IEZjTW9kZWxTZXJ2aWNlO1xuXG4gIEBJbnB1dCgpXG4gIGRyYWdnaW5nOiBib29sZWFuO1xuXG4gIGZsb3djaGFydENvbnN0YW50cyA9IEZsb3djaGFydENvbnN0YW50cztcblxuICBuZ09uSW5pdCgpOiB2b2lkIHtcbiAgfVxuXG59XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/rectangleselect.service.js b/dist/ngx-flowchart/esm5/lib/rectangleselect.service.js new file mode 100644 index 0000000..6556fbb --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/rectangleselect.service.js @@ -0,0 +1,217 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +import scrollparent from './scrollparent'; +/** + * @record + */ +function Rectangle() { } +if (false) { + /** @type {?} */ + Rectangle.prototype.x1; + /** @type {?} */ + Rectangle.prototype.x2; + /** @type {?} */ + Rectangle.prototype.y1; + /** @type {?} */ + Rectangle.prototype.y2; +} +var FcRectangleSelectService = /** @class */ (function () { + function FcRectangleSelectService(modelService, selectElement, applyFunction) { + this.selectRect = { + x1: 0, + x2: 0, + y1: 0, + y2: 0 + }; + this.modelService = modelService; + this.selectElement = selectElement; + this.$canvasElement = $(this.modelService.canvasHtmlElement); + this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement)); + this.applyFunction = applyFunction; + } + /** + * @param {?} e + * @return {?} + */ + FcRectangleSelectService.prototype.mousedown = /** + * @param {?} e + * @return {?} + */ + function (e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && this.selectElement.hidden) { + this.selectElement.hidden = false; + /** @type {?} */ + var offset = this.$canvasElement.offset(); + this.selectRect.x1 = Math.round(e.pageX - offset.left); + this.selectRect.y1 = Math.round(e.pageY - offset.top); + this.selectRect.x2 = this.selectRect.x1; + this.selectRect.y2 = this.selectRect.y1; + this.updateSelectRect(); + } + }; + /** + * @param {?} e + * @return {?} + */ + FcRectangleSelectService.prototype.mousemove = /** + * @param {?} e + * @return {?} + */ + function (e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + var offset = this.$canvasElement.offset(); + this.selectRect.x2 = Math.round(e.pageX - offset.left); + this.selectRect.y2 = Math.round(e.pageY - offset.top); + this.updateScroll(offset); + this.updateSelectRect(); + } + }; + /** + * @private + * @param {?} offset + * @return {?} + */ + FcRectangleSelectService.prototype.updateScroll = /** + * @private + * @param {?} offset + * @return {?} + */ + function (offset) { + /** @type {?} */ + var rect = this.$scrollParent[0].getBoundingClientRect(); + /** @type {?} */ + var bottom = rect.bottom - offset.top; + /** @type {?} */ + var right = rect.right - offset.left; + /** @type {?} */ + var top = rect.top - offset.top; + /** @type {?} */ + var left = rect.left - offset.left; + if (this.selectRect.y2 - top < 25) { + /** @type {?} */ + var topScroll = 25 - (this.selectRect.y2 - top); + /** @type {?} */ + var scroll_1 = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll_1 - topScroll); + } + else if (bottom - this.selectRect.y2 < 40) { + /** @type {?} */ + var bottomScroll = 40 - (bottom - this.selectRect.y2); + /** @type {?} */ + var scroll_2 = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll_2 + bottomScroll); + } + if (this.selectRect.x2 - left < 25) { + /** @type {?} */ + var leftScroll = 25 - (this.selectRect.x2 - left); + /** @type {?} */ + var scroll_3 = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll_3 - leftScroll); + } + else if (right - this.selectRect.x2 < 40) { + /** @type {?} */ + var rightScroll = 40 - (right - this.selectRect.x2); + /** @type {?} */ + var scroll_4 = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll_4 + rightScroll); + } + }; + /** + * @param {?} e + * @return {?} + */ + FcRectangleSelectService.prototype.mouseup = /** + * @param {?} e + * @return {?} + */ + function (e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + var rectBox = (/** @type {?} */ (this.selectElement.getBoundingClientRect())); + this.selectElement.hidden = true; + this.selectObjects(rectBox); + } + }; + /** + * @private + * @return {?} + */ + FcRectangleSelectService.prototype.updateSelectRect = /** + * @private + * @return {?} + */ + function () { + /** @type {?} */ + var x3 = Math.min(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + var x4 = Math.max(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + var y3 = Math.min(this.selectRect.y1, this.selectRect.y2); + /** @type {?} */ + var y4 = Math.max(this.selectRect.y1, this.selectRect.y2); + this.selectElement.style.left = x3 + 'px'; + this.selectElement.style.top = y3 + 'px'; + this.selectElement.style.width = x4 - x3 + 'px'; + this.selectElement.style.height = y4 - y3 + 'px'; + }; + /** + * @private + * @param {?} rectBox + * @return {?} + */ + FcRectangleSelectService.prototype.selectObjects = /** + * @private + * @param {?} rectBox + * @return {?} + */ + function (rectBox) { + var _this = this; + this.applyFunction((/** + * @return {?} + */ + function () { + _this.modelService.selectAllInRect(rectBox); + })); + }; + return FcRectangleSelectService; +}()); +export { FcRectangleSelectService }; +if (false) { + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectRect; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$canvasElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$scrollParent; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.applyFunction; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjdGFuZ2xlc2VsZWN0LnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmxvd2NoYXJ0LyIsInNvdXJjZXMiOlsibGliL3JlY3RhbmdsZXNlbGVjdC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFFQSxPQUFPLFlBQVksTUFBTSxnQkFBZ0IsQ0FBQzs7OztBQUUxQyx3QkFLQzs7O0lBSkMsdUJBQVc7O0lBQ1gsdUJBQVc7O0lBQ1gsdUJBQVc7O0lBQ1gsdUJBQVc7O0FBR2I7SUFlRSxr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HtcbiAgICBjb25zdCB4MyA9IE1hdGgubWluKHRoaXMuc2VsZWN0UmVjdC54MSwgdGhpcy5zZWxlY3RSZWN0LngyKTtcbiAgICBjb25zdCB4NCA9IE1hdGgubWF4KHRoaXMuc2VsZWN0UmVjdC54MSwgdGhpcy5zZWxlY3RSZWN0LngyKTtcbiAgICBjb25zdCB5MyA9IE1hdGgubWluKHRoaXMuc2VsZWN0UmVjdC55MSwgdGhpcy5zZWxlY3RSZWN0LnkyKTtcbiAgICBjb25zdCB5NCA9IE1hdGgubWF4KHRoaXMuc2VsZWN0UmVjdC55MSwgdGhpcy5zZWxlY3RSZWN0LnkyKTtcbiAgICB0aGlzLnNlbGVjdEVsZW1lbnQuc3R5bGUubGVmdCA9IHgzICsgJ3B4JztcbiAgICB0aGlzLnNlbGVjdEVsZW1lbnQuc3R5bGUudG9wID0geTMgKyAncHgnO1xuICAgIHRoaXMuc2VsZWN0RWxlbWVudC5zdHlsZS53aWR0aCA9IHg0IC0geDMgKyAncHgnO1xuICAgIHRoaXMuc2VsZWN0RWxlbWVudC5zdHlsZS5oZWlnaHQgPSB5NCAtIHkzICsgJ3B4JztcbiAgfVxuXG4gIHByaXZhdGUgc2VsZWN0T2JqZWN0cyhyZWN0Qm94OiBGY1JlY3RCb3gpIHtcbiAgICB0aGlzLmFwcGx5RnVuY3Rpb24oKCkgPT4ge1xuICAgICAgdGhpcy5tb2RlbFNlcnZpY2Uuc2VsZWN0QWxsSW5SZWN0KHJlY3RCb3gpO1xuICAgIH0pO1xuICB9XG5cbn1cblxuIl19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/lib/scrollparent.js b/dist/ngx-flowchart/esm5/lib/scrollparent.js new file mode 100644 index 0000000..373bcdf --- /dev/null +++ b/dist/ngx-flowchart/esm5/lib/scrollparent.js @@ -0,0 +1,43 @@ +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +/** @type {?} */ +var regex = /(auto|scroll)/; +/** @type {?} */ +var style = (/** + * @param {?} node + * @param {?} prop + * @return {?} + */ +function (node, prop) { + return getComputedStyle(node, null).getPropertyValue(prop); +}); +var ɵ0 = style; +/** @type {?} */ +var scroll = (/** + * @param {?} node + * @return {?} + */ +function (node) { + return regex.test(style(node, 'overflow') + + style(node, 'overflow-y') + + style(node, 'overflow-x')); +}); +var ɵ1 = scroll; +/** @type {?} */ +var scrollparent = (/** + * @param {?} node + * @return {?} + */ +function (node) { + return !node || node === document.body + ? document.body + : scroll(node) + ? node + : scrollparent((/** @type {?} */ (node.parentNode))); +}); +var ɵ2 = scrollparent; +export default scrollparent; +export { ɵ0, ɵ1, ɵ2 }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xscGFyZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZsb3djaGFydC8iLCJzb3VyY2VzIjpbImxpYi9zY3JvbGxwYXJlbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7SUFBTSxLQUFLLEdBQUcsZUFBZTs7SUFFdkIsS0FBSzs7Ozs7QUFBRyxVQUFDLElBQWEsRUFBRSxJQUFZO0lBQ3hDLE9BQUEsZ0JBQWdCLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFDLGdCQUFnQixDQUFDLElBQUksQ0FBQztBQUFuRCxDQUFtRCxDQUFBOzs7SUFFL0MsTUFBTTs7OztBQUFHLFVBQUMsSUFBYTtJQUMzQixPQUFBLEtBQUssQ0FBQyxJQUFJLENBQ1IsS0FBSyxDQUFDLElBQUksRUFBRSxVQUFVLENBQUM7UUFDdkIsS0FBSyxDQUFDLElBQUksRUFBRSxZQUFZLENBQUM7UUFDekIsS0FBSyxDQUFDLElBQUksRUFBRSxZQUFZLENBQUMsQ0FBQztBQUg1QixDQUc0QixDQUFBOzs7SUFFeEIsWUFBWTs7OztBQUFHLFVBQUMsSUFB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flowchart.js b/dist/ngx-flowchart/esm5/ngx-flowchart.js index 05edc6b..57d9d13 100644 --- a/dist/ngx-flowchart/esm5/ngx-flowchart.js +++ b/dist/ngx-flowchart/esm5/ngx-flowchart.js @@ -5,5 +5,11 @@ /** * Generated bundle index. Do not edit. */ -export { NgxFlowchartService, NgxFlowchartComponent, NgxFlowchartModule } from './public-api'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJuZ3gtZmxvd2NoYXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSwrRUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0= \ No newline at end of file +export { FcNodeComponent, NgxFlowchartComponent, NgxFlowchartModule, fcTopSort, FC_NODE_COMPONENT_CONFIG, FlowchartConstants, ModelvalidationError } from './public-api'; +export { FcConnectorDirective as ɵf } from './lib/connector.directive'; +export { DefaultFcNodeComponent as ɵd } from './lib/default-node.component'; +export { FcEdgeDrawingService as ɵc } from './lib/edge-drawing.service'; +export { FcMagnetDirective as ɵe } from './lib/magnet.directive'; +export { FcModelValidationService as ɵb } from './lib/modelvalidation.service'; +export { FcNodeContainerComponent as ɵa } from './lib/node.component'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZsb3djaGFydC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJuZ3gtZmxvd2NoYXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7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WIvbW9kZWx2YWxpZGF0aW9uLnNlcnZpY2UnO1xuZXhwb3J0IHtGY05vZGVDb250YWluZXJDb21wb25lbnQgYXMgybVhfSBmcm9tICcuL2xpYi9ub2RlLmNvbXBvbmVudCc7Il19 \ No newline at end of file diff --git a/dist/ngx-flowchart/esm5/public-api.js b/dist/ngx-flowchart/esm5/public-api.js index eab613d..bae0376 100644 --- a/dist/ngx-flowchart/esm5/public-api.js +++ b/dist/ngx-flowchart/esm5/public-api.js @@ -5,7 +5,8 @@ /* * Public API Surface of ngx-flowchart */ -export { NgxFlowchartService } from './lib/ngx-flowchart.service'; export { NgxFlowchartComponent } from './lib/ngx-flowchart.component'; export { NgxFlowchartModule } from './lib/ngx-flowchart.module'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxvQ0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxzQ0FBYywrQkFBK0IsQ0FBQztBQUM5QyxtQ0FBYyw0QkFBNEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LWZsb3djaGFydFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1mbG93Y2hhcnQuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0Lm1vZHVsZSc7XG4iXX0= \ No newline at end of file +export { fcTopSort, FC_NODE_COMPONENT_CONFIG, FlowchartConstants, ModelvalidationError } from './lib/ngx-flowchart.models'; +export { FcNodeComponent } from './lib/node.component'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1mbG93Y2hhcnQvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxzQ0FBYywrQkFBK0IsQ0FBQztBQUM5QyxtQ0FBYyw0QkFBNEIsQ0FBQztBQUMzQyw4RkFBYyw0QkFBNEIsQ0FBQztBQUMzQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sc0JBQXNCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIG5neC1mbG93Y2hhcnRcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0Lm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtZmxvd2NoYXJ0Lm1vZGVscyc7XG5leHBvcnQgeyBGY05vZGVDb21wb25lbnQgfSBmcm9tICcuL2xpYi9ub2RlLmNvbXBvbmVudCc7XG4iXX0= \ No newline at end of file diff --git a/dist/ngx-flowchart/fesm2015/ngx-flowchart.js b/dist/ngx-flowchart/fesm2015/ngx-flowchart.js index e6d7e06..aba5216 100644 --- a/dist/ngx-flowchart/fesm2015/ngx-flowchart.js +++ b/dist/ngx-flowchart/fesm2015/ngx-flowchart.js @@ -1,57 +1,3592 @@ -import { Injectable, ɵɵdefineInjectable, Component, NgModule } from '@angular/core'; +import { InjectionToken, Injectable, Component, ChangeDetectionStrategy, ElementRef, IterableDiffers, ChangeDetectorRef, NgZone, HostBinding, Input, HostListener, Directive, Inject, ComponentFactoryResolver, ViewChild, ViewContainerRef, NgModule } from '@angular/core'; +import { of } from 'rxjs'; +import { CommonModule } from '@angular/common'; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ -class NgxFlowchartService { +/** @type {?} */ +const FC_NODE_COMPONENT_CONFIG = new InjectionToken('fc-node.component.config'); +/** + * @record + */ +function FcNodeComponentConfig() { } +if (false) { + /** @type {?} */ + FcNodeComponentConfig.prototype.nodeComponentType; +} +/** @type {?} */ +const htmlPrefix = 'fc'; +/** @type {?} */ +const leftConnectorType = 'leftConnector'; +/** @type {?} */ +const rightConnectorType = 'rightConnector'; +/** @type {?} */ +const FlowchartConstants = { + htmlPrefix, + leftConnectorType, + rightConnectorType, + curvedStyle: 'curved', + lineStyle: 'line', + dragAnimationRepaint: 'repaint', + dragAnimationShadow: 'shadow', + canvasClass: htmlPrefix + '-canvas', + selectedClass: htmlPrefix + '-selected', + editClass: htmlPrefix + '-edit', + activeClass: htmlPrefix + '-active', + hoverClass: htmlPrefix + '-hover', + draggingClass: htmlPrefix + '-dragging', + edgeClass: htmlPrefix + '-edge', + edgeLabelClass: htmlPrefix + '-edge-label', + connectorClass: htmlPrefix + '-connector', + magnetClass: htmlPrefix + '-magnet', + nodeClass: htmlPrefix + '-node', + nodeOverlayClass: htmlPrefix + '-node-overlay', + leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's', + rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's', + canvasResizeThreshold: 200, + canvasResizeStep: 200 +}; +/** + * @record + */ +function FcCoords() { } +if (false) { + /** @type {?|undefined} */ + FcCoords.prototype.x; + /** @type {?|undefined} */ + FcCoords.prototype.y; +} +/** + * @record + */ +function FcOffset() { } +if (false) { + /** @type {?} */ + FcOffset.prototype.top; + /** @type {?} */ + FcOffset.prototype.left; +} +/** + * @record + */ +function FcRectBox() { } +if (false) { + /** @type {?} */ + FcRectBox.prototype.top; + /** @type {?} */ + FcRectBox.prototype.left; + /** @type {?} */ + FcRectBox.prototype.right; + /** @type {?} */ + FcRectBox.prototype.bottom; +} +/** + * @record + */ +function FcConnector() { } +if (false) { + /** @type {?} */ + FcConnector.prototype.id; + /** @type {?} */ + FcConnector.prototype.type; +} +/** + * @record + */ +function FcNode() { } +if (false) { + /** @type {?} */ + FcNode.prototype.id; + /** @type {?} */ + FcNode.prototype.name; + /** @type {?} */ + FcNode.prototype.connectors; + /** @type {?|undefined} */ + FcNode.prototype.readonly; + /* Skipping unhandled member: [key: string]: any;*/ +} +/** + * @record + */ +function FcEdge() { } +if (false) { + /** @type {?|undefined} */ + FcEdge.prototype.label; + /** @type {?|undefined} */ + FcEdge.prototype.source; + /** @type {?|undefined} */ + FcEdge.prototype.destination; + /** @type {?|undefined} */ + FcEdge.prototype.active; +} +/** + * @record + */ +function FcItemInfo() { } +if (false) { + /** @type {?|undefined} */ + FcItemInfo.prototype.node; + /** @type {?|undefined} */ + FcItemInfo.prototype.edge; +} +/** + * @record + */ +function FcModel() { } +if (false) { + /** @type {?} */ + FcModel.prototype.nodes; + /** @type {?} */ + FcModel.prototype.edges; +} +/** + * @record + */ +function UserCallbacks() { } +if (false) { + /** @type {?|undefined} */ + UserCallbacks.prototype.dropNode; + /** @type {?|undefined} */ + UserCallbacks.prototype.createEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeAdded; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeDoubleClick; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeMouseOver; + /** @type {?|undefined} */ + UserCallbacks.prototype.isValidEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeEdit; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeCallbacks; +} +/** + * @record + */ +function UserNodeCallbacks() { } +if (false) { + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.nodeEdit; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.doubleClick; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseDown; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseEnter; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseLeave; +} +/** + * @record + */ +function FcCallbacks() { } +if (false) { + /** @type {?} */ + FcCallbacks.prototype.nodeDragstart; + /** @type {?} */ + FcCallbacks.prototype.nodeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDragstart; + /** @type {?} */ + FcCallbacks.prototype.edgeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDrop; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverConnector; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverMagnet; + /** @type {?} */ + FcCallbacks.prototype.edgeDragleaveMagnet; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOver; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOut; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseEnter; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseLeave; + /** @type {?} */ + FcCallbacks.prototype.nodeClicked; +} +/** + * @record + */ +function FcAdjacentList() { } +class ModelvalidationError extends Error { + /** + * @param {?} message + */ + constructor(message) { + super(message); + } +} +/** + * @param {?} graph + * @return {?} + */ +function fcTopSort(graph) { + /** @type {?} */ + const adjacentList = {}; + graph.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + adjacentList[node.id] = { incoming: 0, outgoing: [] }; + })); + graph.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + (edge) => { + /** @type {?} */ + const sourceNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + return connector.id === edge.source; + })); + }))[0]; + /** @type {?} */ + const destinationNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + return connector.id === edge.destination; + })); + }))[0]; + adjacentList[sourceNode.id].outgoing.push(destinationNode.id); + adjacentList[destinationNode.id].incoming++; + })); + /** @type {?} */ + const orderedNodes = []; + /** @type {?} */ + const sourceNodes = []; + for (const node of Object.keys(adjacentList)) { + /** @type {?} */ + const edges = adjacentList[node]; + if (edges.incoming === 0) { + sourceNodes.push(node); + } + } + while (sourceNodes.length !== 0) { + /** @type {?} */ + const sourceNode = sourceNodes.pop(); + for (let i = 0; i < adjacentList[sourceNode].outgoing.length; i++) { + /** @type {?} */ + const destinationNode = adjacentList[sourceNode].outgoing[i]; + adjacentList[destinationNode].incoming--; + if (adjacentList[destinationNode].incoming === 0) { + sourceNodes.push(destinationNode); + } + adjacentList[sourceNode].outgoing.splice(i, 1); + i--; + } + orderedNodes.push(sourceNode); + } + /** @type {?} */ + let hasEdges = false; + for (const node of Object.keys(adjacentList)) { + /** @type {?} */ + const edges = adjacentList[node]; + if (edges.incoming !== 0) { + hasEdges = true; + } + } + if (hasEdges) { + return null; + } + else { + return orderedNodes; + } +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +class FcModelService { + /** + * @param {?} modelValidation + * @param {?} model + * @param {?} cd + * @param {?} selectedObjects + * @param {?} dropNode + * @param {?} createEdge + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @param {?} canvasHtmlElement + * @param {?} svgHtmlElement + */ + constructor(modelValidation, model, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) { + this.connectorsHtmlElements = {}; + this.nodesHtmlElements = {}; + this.canvasHtmlElement = null; + this.dragImage = null; + this.svgHtmlElement = null; + this.modelValidation = modelValidation; + this.model = model; + this.cd = cd; + this.canvasHtmlElement = canvasHtmlElement; + this.svgHtmlElement = svgHtmlElement; + this.modelValidation.validateModel(this.model); + this.selectedObjects = selectedObjects; + this.dropNode = dropNode || ((/** + * @return {?} + */ + () => { })); + this.createEdge = createEdge || ((/** + * @return {?} + */ + () => of({ label: 'label' }))); + this.edgeAddedCallback = edgeAddedCallback || ((/** + * @return {?} + */ + () => { })); + this.nodeRemovedCallback = nodeRemovedCallback || ((/** + * @return {?} + */ + () => { })); + this.edgeRemovedCallback = edgeRemovedCallback || ((/** + * @return {?} + */ + () => { })); + this.connectors = new ConnectorsModel(this); + this.nodes = new NodesModel(this); + this.edges = new EdgesModel(this); + } + /** + * @return {?} + */ + detectChanges() { + setTimeout((/** + * @return {?} + */ + () => { + this.cd.detectChanges(); + }), 0); + } + /** + * @param {?} object + * @return {?} + */ + selectObject(object) { + if (this.isEditable()) { + if (this.selectedObjects.indexOf(object) === -1) { + this.selectedObjects.push(object); + } + } + } + /** + * @param {?} object + * @return {?} + */ + deselectObject(object) { + if (this.isEditable()) { + /** @type {?} */ + const index = this.selectedObjects.indexOf(object); + if (index === -1) { + throw new Error('Tried to deselect an unselected object'); + } + this.selectedObjects.splice(index, 1); + } + } + /** + * @param {?} object + * @return {?} + */ + toggleSelectedObject(object) { + if (this.isSelectedObject(object)) { + this.deselectObject(object); + } + else { + this.selectObject(object); + } + } + /** + * @param {?} object + * @return {?} + */ + isSelectedObject(object) { + return this.selectedObjects.indexOf(object) !== -1; + } + /** + * @return {?} + */ + selectAll() { + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + node => { + if (!node.readonly) { + this.nodes.select(node); + } + })); + this.model.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + edge => { + this.edges.select(edge); + })); + this.detectChanges(); + } + /** + * @return {?} + */ + deselectAll() { + this.selectedObjects.splice(0, this.selectedObjects.length); + this.detectChanges(); + } + /** + * @param {?} object + * @return {?} + */ + isEditObject(object) { + return this.selectedObjects.length === 1 && + this.selectedObjects.indexOf(object) !== -1; + } + /** + * @private + * @param {?} x + * @param {?} y + * @param {?} rectBox + * @return {?} + */ + inRectBox(x, y, rectBox) { + return x >= rectBox.left && x <= rectBox.right && + y >= rectBox.top && y <= rectBox.bottom; + } + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + getItemInfoAtPoint(x, y) { + return { + node: this.getNodeAtPoint(x, y), + edge: this.getEdgeAtPoint(x, y) + }; + } + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + getNodeAtPoint(x, y) { + for (const node of this.model.nodes) { + /** @type {?} */ + const element = this.nodes.getHtmlElement(node.id); + /** @type {?} */ + const nodeElementBox = element.getBoundingClientRect(); + if (x >= nodeElementBox.left && x <= nodeElementBox.right + && y >= nodeElementBox.top && y <= nodeElementBox.bottom) { + return node; + } + } + return null; + } + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + getEdgeAtPoint(x, y) { + /** @type {?} */ + const element = document.elementFromPoint(x, y); + /** @type {?} */ + const id = element.id; + /** @type {?} */ + let edgeIndex = -1; + if (id) { + if (id.startsWith('fc-edge-path-')) { + edgeIndex = Number(id.substring('fc-edge-path-'.length)); + } + else if (id.startsWith('fc-edge-label-')) { + edgeIndex = Number(id.substring('fc-edge-label-'.length)); + } + } + if (edgeIndex > -1) { + return this.model.edges[edgeIndex]; + } + return null; + } + /** + * @param {?} rectBox + * @return {?} + */ + selectAllInRect(rectBox) { + this.model.nodes.forEach((/** + * @param {?} value + * @return {?} + */ + (value) => { + /** @type {?} */ + const element = this.nodes.getHtmlElement(value.id); + /** @type {?} */ + const nodeElementBox = element.getBoundingClientRect(); + if (!value.readonly) { + /** @type {?} */ + const x = nodeElementBox.left + nodeElementBox.width / 2; + /** @type {?} */ + const y = nodeElementBox.top + nodeElementBox.height / 2; + if (this.inRectBox(x, y, rectBox)) { + this.nodes.select(value); + } + else { + if (this.nodes.isSelected(value)) { + this.nodes.deselect(value); + } + } + } + })); + /** @type {?} */ + const canvasElementBox = this.canvasHtmlElement.getBoundingClientRect(); + this.model.edges.forEach((/** + * @param {?} value + * @return {?} + */ + (value) => { + /** @type {?} */ + const start = this.edges.sourceCoord(value); + /** @type {?} */ + const end = this.edges.destCoord(value); + /** @type {?} */ + const x = (start.x + end.x) / 2 + canvasElementBox.left; + /** @type {?} */ + const y = (start.y + end.y) / 2 + canvasElementBox.top; + if (this.inRectBox(x, y, rectBox)) { + this.edges.select(value); + } + else { + if (this.edges.isSelected(value)) { + this.edges.deselect(value); + } + } + })); + } + /** + * @return {?} + */ + deleteSelected() { + /** @type {?} */ + const edgesToDelete = this.edges.getSelectedEdges(); + edgesToDelete.forEach((/** + * @param {?} edge + * @return {?} + */ + (edge) => { + this.edges.delete(edge); + })); + /** @type {?} */ + const nodesToDelete = this.nodes.getSelectedNodes(); + nodesToDelete.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + this.nodes.delete(node); + })); + } + /** + * @return {?} + */ + isEditable() { + return this.dropTargetId === undefined; + } + /** + * @return {?} + */ + isDropSource() { + return this.dropTargetId !== undefined; + } + /** + * @return {?} + */ + getDragImage() { + if (!this.dragImage) { + this.dragImage = new Image(); + this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + this.dragImage.style.visibility = 'hidden'; + } + return this.dragImage; + } + /** + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @return {?} + */ + registerCallbacks(edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback) { + this.edgeAddedCallback = edgeAddedCallback; + this.nodeRemovedCallback = nodeRemovedCallback; + this.edgeRemovedCallback = edgeRemovedCallback; + } +} +if (false) { + /** @type {?} */ + FcModelService.prototype.modelValidation; + /** @type {?} */ + FcModelService.prototype.model; + /** @type {?} */ + FcModelService.prototype.cd; + /** @type {?} */ + FcModelService.prototype.selectedObjects; + /** @type {?} */ + FcModelService.prototype.connectorsHtmlElements; + /** @type {?} */ + FcModelService.prototype.nodesHtmlElements; + /** @type {?} */ + FcModelService.prototype.canvasHtmlElement; + /** @type {?} */ + FcModelService.prototype.dragImage; + /** @type {?} */ + FcModelService.prototype.svgHtmlElement; + /** @type {?} */ + FcModelService.prototype.dropNode; + /** @type {?} */ + FcModelService.prototype.createEdge; + /** @type {?} */ + FcModelService.prototype.edgeAddedCallback; + /** @type {?} */ + FcModelService.prototype.nodeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.edgeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.dropTargetId; + /** @type {?} */ + FcModelService.prototype.connectors; + /** @type {?} */ + FcModelService.prototype.nodes; + /** @type {?} */ + FcModelService.prototype.edges; +} +/** + * @record + */ +function HtmlElementMap() { } +/** + * @abstract + * @template T + */ +class AbstractFcModel { + /** + * @protected + * @param {?} modelService + */ + constructor(modelService) { + this.modelService = modelService; + } + /** + * @param {?} object + * @return {?} + */ + select(object) { + this.modelService.selectObject(object); + } + /** + * @param {?} object + * @return {?} + */ + deselect(object) { + this.modelService.deselectObject(object); + } + /** + * @param {?} object + * @return {?} + */ + toggleSelected(object) { + this.modelService.toggleSelectedObject(object); + } + /** + * @param {?} object + * @return {?} + */ + isSelected(object) { + return this.modelService.isSelectedObject(object); + } + /** + * @param {?} object + * @return {?} + */ + isEdit(object) { + return this.modelService.isEditObject(object); + } +} +if (false) { + /** @type {?} */ + AbstractFcModel.prototype.modelService; +} +class ConnectorsModel extends AbstractFcModel { + /** + * @param {?} modelService + */ + constructor(modelService) { + super(modelService); + } + /** + * @param {?} connectorId + * @return {?} + */ + getConnector(connectorId) { + /** @type {?} */ + const model = this.modelService.model; + for (const node of model.nodes) { + for (const connector of node.connectors) { + if (connector.id === connectorId) { + return connector; + } + } + } + } + /** + * @param {?} connectorId + * @return {?} + */ + getHtmlElement(connectorId) { + return this.modelService.connectorsHtmlElements[connectorId]; + } + /** + * @param {?} connectorId + * @param {?} element + * @return {?} + */ + setHtmlElement(connectorId, element) { + this.modelService.connectorsHtmlElements[connectorId] = element; + this.modelService.detectChanges(); + } + /** + * @private + * @param {?} connectorId + * @param {?=} centered + * @return {?} + */ + _getCoords(connectorId, centered) { + /** @type {?} */ + const element = this.getHtmlElement(connectorId); + /** @type {?} */ + const canvas = this.modelService.canvasHtmlElement; + if (element === null || element === undefined || canvas === null) { + return { x: 0, y: 0 }; + } + /** @type {?} */ + const connectorElementBox = element.getBoundingClientRect(); + /** @type {?} */ + const canvasElementBox = canvas.getBoundingClientRect(); + /** @type {?} */ + let coords = { + x: connectorElementBox.left - canvasElementBox.left, + y: connectorElementBox.top - canvasElementBox.top + }; + if (centered) { + coords = { + x: Math.round(coords.x + element.offsetWidth / 2), + y: Math.round(coords.y + element.offsetHeight / 2) + }; + } + return coords; + } + /** + * @param {?} connectorId + * @return {?} + */ + getCoords(connectorId) { + return this._getCoords(connectorId, false); + } + /** + * @param {?} connectorId + * @return {?} + */ + getCenteredCoord(connectorId) { + return this._getCoords(connectorId, true); + } +} +class NodesModel extends AbstractFcModel { + /** + * @param {?} modelService + */ + constructor(modelService) { + super(modelService); + } + /** + * @param {?} node + * @param {?} type + * @return {?} + */ + getConnectorsByType(node, type) { + return node.connectors.filter((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + return connector.type === type; + })); + } + /** + * @private + * @param {?} node + * @param {?} connector + * @return {?} + */ + _addConnector(node, connector) { + node.connectors.push(connector); + try { + this.modelService.modelValidation.validateNode(node); + } + catch (error) { + node.connectors.splice(node.connectors.indexOf(connector), 1); + throw error; + } + } + /** + * @param {?} node + * @return {?} + */ + delete(node) { + if (this.isSelected(node)) { + this.deselect(node); + } + /** @type {?} */ + const model = this.modelService.model; + /** @type {?} */ + const index = model.nodes.indexOf(node); + if (index === -1) { + if (node === undefined) { + throw new Error('Passed undefined'); + } + throw new Error('Tried to delete not existing node'); + } + /** @type {?} */ + const connectorIds = this.getConnectorIds(node); + for (let i = 0; i < model.edges.length; i++) { + /** @type {?} */ + const edge = model.edges[i]; + if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) { + this.modelService.edges.delete(edge); + i--; + } + } + model.nodes.splice(index, 1); + this.modelService.nodeRemovedCallback(node); + } + /** + * @return {?} + */ + getSelectedNodes() { + /** @type {?} */ + const model = this.modelService.model; + return model.nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => { + return this.modelService.nodes.isSelected(node); + })); + } + /** + * @param {?} node + * @param {?=} ctrlKey + * @return {?} + */ + handleClicked(node, ctrlKey) { + if (ctrlKey) { + this.modelService.nodes.toggleSelected(node); + } + else { + this.modelService.deselectAll(); + this.modelService.nodes.select(node); + } + } + /** + * @private + * @param {?} node + * @return {?} + */ + _addNode(node) { + /** @type {?} */ + const model = this.modelService.model; + try { + model.nodes.push(node); + this.modelService.modelValidation.validateNodes(model.nodes); + } + catch (error) { + model.nodes.splice(model.nodes.indexOf(node), 1); + throw error; + } + } + /** + * @param {?} node + * @return {?} + */ + getConnectorIds(node) { + return node.connectors.map((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + return connector.id; + })); + } + /** + * @param {?} connectorId + * @return {?} + */ + getNodeByConnectorId(connectorId) { + /** @type {?} */ + const model = this.modelService.model; + for (const node of model.nodes) { + /** @type {?} */ + const connectorIds = this.getConnectorIds(node); + if (connectorIds.indexOf(connectorId) > -1) { + return node; + } + } + return null; + } + /** + * @param {?} nodeId + * @return {?} + */ + getHtmlElement(nodeId) { + return this.modelService.nodesHtmlElements[nodeId]; + } + /** + * @param {?} nodeId + * @param {?} element + * @return {?} + */ + setHtmlElement(nodeId, element) { + this.modelService.nodesHtmlElements[nodeId] = element; + this.modelService.detectChanges(); + } +} +class EdgesModel extends AbstractFcModel { + /** + * @param {?} modelService + */ + constructor(modelService) { + super(modelService); + } + /** + * @param {?} edge + * @return {?} + */ + ready(edge) { + /** @type {?} */ + const source = this.modelService.connectors.getHtmlElement(edge.source); + /** @type {?} */ + const destination = this.modelService.connectors.getHtmlElement(edge.destination); + return source !== undefined && destination !== undefined; + } + /** + * @param {?} edge + * @return {?} + */ + sourceCoord(edge) { + return this.modelService.connectors.getCenteredCoord(edge.source); + } + /** + * @param {?} edge + * @return {?} + */ + destCoord(edge) { + return this.modelService.connectors.getCenteredCoord(edge.destination); + } + /** + * @param {?} edge + * @return {?} + */ + delete(edge) { + /** @type {?} */ + const model = this.modelService.model; + /** @type {?} */ + const index = model.edges.indexOf(edge); + if (index === -1) { + throw new Error('Tried to delete not existing edge'); + } + if (this.isSelected(edge)) { + this.deselect(edge); + } + model.edges.splice(index, 1); + this.modelService.edgeRemovedCallback(edge); + } + /** + * @return {?} + */ + getSelectedEdges() { + /** @type {?} */ + const model = this.modelService.model; + return model.edges.filter((/** + * @param {?} edge + * @return {?} + */ + (edge) => { + return this.modelService.edges.isSelected(edge); + })); + } + /** + * @param {?} edge + * @param {?=} ctrlKey + * @return {?} + */ + handleEdgeMouseClick(edge, ctrlKey) { + if (ctrlKey) { + this.modelService.edges.toggleSelected(edge); + } + else { + this.modelService.deselectAll(); + this.modelService.edges.select(edge); + } + } + /** + * @param {?} edge + * @return {?} + */ + putEdge(edge) { + /** @type {?} */ + const model = this.modelService.model; + model.edges.push(edge); + } + /** + * @param {?} event + * @param {?} sourceConnector + * @param {?} destConnector + * @param {?} label + * @return {?} + */ + _addEdge(event, sourceConnector, destConnector, label) { + this.modelService.modelValidation.validateConnector(sourceConnector); + this.modelService.modelValidation.validateConnector(destConnector); + /** @type {?} */ + const edge = {}; + edge.source = sourceConnector.id; + edge.destination = destConnector.id; + edge.label = label; + /** @type {?} */ + const model = this.modelService.model; + this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes); + this.modelService.createEdge(event, edge).subscribe((/** + * @param {?} created + * @return {?} + */ + (created) => { + model.edges.push(created); + this.modelService.edgeAddedCallback(created); + })); + } +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +class FcModelValidationService { constructor() { } + /** + * @param {?} model + * @return {?} + */ + validateModel(model) { + this.validateNodes(model.nodes); + this._validateEdges(model.edges, model.nodes); + return model; + } + /** + * @param {?} nodes + * @return {?} + */ + validateNodes(nodes) { + /** @type {?} */ + const ids = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + this.validateNode(node); + if (ids.indexOf(node.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + ids.push(node.id); + })); + /** @type {?} */ + const connectorIds = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + if (connectorIds.indexOf(connector.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + connectorIds.push(connector.id); + })); + })); + return nodes; + } + /** + * @param {?} node + * @return {?} + */ + validateNode(node) { + if (node.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (typeof node.name !== 'string') { + throw new ModelvalidationError('Name not valid.'); + } + if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (!Array.isArray(node.connectors)) { + throw new ModelvalidationError('Connectors not valid.'); + } + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + (connector) => { + this.validateConnector(connector); + })); + return node; + } + /** + * @private + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + _validateEdges(edges, nodes) { + edges.forEach((/** + * @param {?} edge + * @return {?} + */ + (edge) => { + this._validateEdge(edge, nodes); + })); + edges.forEach((/** + * @param {?} edge1 + * @param {?} index1 + * @return {?} + */ + (edge1, index1) => { + edges.forEach((/** + * @param {?} edge2 + * @param {?} index2 + * @return {?} + */ + (edge2, index2) => { + if (index1 !== index2) { + if ((edge1.source === edge2.source && edge1.destination === edge2.destination) || + (edge1.source === edge2.destination && edge1.destination === edge2.source)) { + throw new ModelvalidationError('Duplicated edge.'); + } + } + })); + })); + if (fcTopSort({ nodes, edges }) === null) { + throw new ModelvalidationError('Graph has a circle.'); + } + return edges; + } + /** + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + validateEdges(edges, nodes) { + this.validateNodes(nodes); + return this._validateEdges(edges, nodes); + } + /** + * @private + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + _validateEdge(edge, nodes) { + if (edge.source === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + if (edge.destination === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (edge.source === edge.destination) { + throw new ModelvalidationError('Edge with same source and destination connectors.'); + } + /** @type {?} */ + const sourceNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + (connector) => connector.id === edge.source))))[0]; + if (sourceNode === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + /** @type {?} */ + const destinationNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + (node) => node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + (connector) => connector.id === edge.destination))))[0]; + if (destinationNode === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (sourceNode === destinationNode) { + throw new ModelvalidationError('Edge with same source and destination nodes.'); + } + return edge; + } + /** + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + validateEdge(edge, nodes) { + this.validateNodes(nodes); + return this._validateEdge(edge, nodes); + } + /** + * @param {?} connector + * @return {?} + */ + validateConnector(connector) { + if (connector.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') { + throw new ModelvalidationError('Type not valid.'); + } + return connector; + } +} +FcModelValidationService.decorators = [ + { type: Injectable } +]; +/** @nocollapse */ +FcModelValidationService.ctorParameters = () => []; + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +/** @type {?} */ +const nodeDropScope = { + dropElement: null +}; +class FcNodeDraggingService { + /** + * @param {?} modelService + * @param {?} applyFunction + * @param {?} automaticResize + * @param {?} dragAnimation + */ + constructor(modelService, applyFunction, automaticResize, dragAnimation) { + this.nodeDraggingScope = { + shadowDragStarted: false, + dropElement: null, + draggedNodes: [], + shadowElements: [] + }; + this.dragOffsets = []; + this.draggedElements = []; + this.destinationHtmlElements = []; + this.oldDisplayStyles = []; + this.modelService = modelService; + this.automaticResize = automaticResize; + this.dragAnimation = dragAnimation; + this.applyFunction = applyFunction; + } + /** + * @private + * @param {?} coordinate + * @param {?} max + * @return {?} + */ + getCoordinate(coordinate, max) { + coordinate = Math.max(coordinate, 0); + coordinate = Math.min(coordinate, max); + return coordinate; + } + /** + * @private + * @param {?} x + * @return {?} + */ + getXCoordinate(x) { + return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth); + } + /** + * @private + * @param {?} y + * @return {?} + */ + getYCoordinate(y) { + return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight); + } + /** + * @private + * @param {?} draggedNode + * @param {?} nodeElement + * @return {?} + */ + resizeCanvas(draggedNode, nodeElement) { + if (this.automaticResize && !this.modelService.isDropSource()) { + /** @type {?} */ + const canvasElement = this.modelService.canvasHtmlElement; + if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px'; + } + if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px'; + } + } + } + /** + * @param {?} node + * @return {?} + */ + isDraggingNode(node) { + return this.nodeDraggingScope.draggedNodes.includes(node); + } + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + dragstart(event, node) { + if (node.readonly) { + return; + } + this.dragOffsets.length = 0; + this.draggedElements.length = 0; + this.nodeDraggingScope.draggedNodes.length = 0; + this.nodeDraggingScope.shadowElements.length = 0; + this.destinationHtmlElements.length = 0; + this.oldDisplayStyles.length = 0; + /** @type {?} */ + const elements = []; + /** @type {?} */ + const nodes = []; + if (this.modelService.nodes.isSelected(node)) { + /** @type {?} */ + const selectedNodes = this.modelService.nodes.getSelectedNodes(); + for (const selectedNode of selectedNodes) { + /** @type {?} */ + const element = $(this.modelService.nodes.getHtmlElement(selectedNode.id)); + elements.push(element); + nodes.push(selectedNode); + } + } + else { + elements.push($((/** @type {?} */ (event.target)))); + nodes.push(node); + } + /** @type {?} */ + const offsetsX = []; + /** @type {?} */ + const offsetsY = []; + for (const element of elements) { + offsetsX.push(parseInt(element.css('left'), 10) - event.clientX); + offsetsY.push(parseInt(element.css('top'), 10) - event.clientY); + } + /** @type {?} */ + const originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + if (this.modelService.isDropSource()) { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + nodeDropScope.dropElement = (/** @type {?} */ (elements[0][0].cloneNode(true))); + /** @type {?} */ + const offset = $(this.modelService.canvasHtmlElement).offset(); + nodeDropScope.dropElement.offsetInfo = { + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + nodeDropScope.dropElement.style.position = 'absolute'; + nodeDropScope.dropElement.style.pointerEvents = 'none'; + nodeDropScope.dropElement.style.zIndex = '9999'; + document.body.appendChild(nodeDropScope.dropElement); + /** @type {?} */ + const dropNodeInfo = { + node, + dropTargetId: this.modelService.dropTargetId, + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo)); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + /** @type {?} */ + const target = (/** @type {?} */ (event.target)); + this.destinationHtmlElements.push(target); + this.oldDisplayStyles.push(target.style.display); + target.style.display = 'none'; + this.nodeDraggingScope.shadowDragStarted = true; + } + return; + } + this.nodeDraggingScope.draggedNodes = nodes; + for (let i = 0; i < elements.length; i++) { + this.draggedElements.push(elements[i][0]); + this.dragOffsets.push({ + x: offsetsX[i], + y: offsetsY[i] + }); + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + for (let i = 0; i < this.draggedElements.length; i++) { + /** @type {?} */ + const dragOffset = this.dragOffsets[i]; + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const shadowElement = $(`
` + + `

${draggedNode.name}

`); + /** @type {?} */ + const targetInnerNode = $(this.draggedElements[i]).children()[0]; + shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor; + this.nodeDraggingScope.shadowElements.push(shadowElement); + this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]); + } + } + originalEvent.dataTransfer.setData('text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + for (let i = 0; i < this.draggedElements.length; i++) { + this.destinationHtmlElements.push(this.draggedElements[i]); + this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); + this.destinationHtmlElements[i].style.display = 'none'; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.nodeDraggingScope.shadowDragStarted = true; + } + } + } + /** + * @param {?} event + * @return {?} + */ + drop(event) { + if (this.modelService.isDropSource()) { + event.preventDefault(); + return false; + } + /** @type {?} */ + let dropNode = null; + /** @type {?} */ + const originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + /** @type {?} */ + const infoText = originalEvent.dataTransfer.getData('text'); + if (infoText) { + /** @type {?} */ + let dropNodeInfo = null; + try { + dropNodeInfo = JSON.parse(infoText); + } + catch (e) { } + if (dropNodeInfo && dropNodeInfo.dropTargetId) { + if (this.modelService.canvasHtmlElement.id && + this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) { + dropNode = dropNodeInfo.node; + /** @type {?} */ + const offset = $(this.modelService.canvasHtmlElement).offset(); + /** @type {?} */ + const x = event.clientX - offset.left; + /** @type {?} */ + const y = event.clientY - offset.top; + dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x)); + dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y)); + } + } + } + if (dropNode) { + this.modelService.dropNode(event, dropNode); + event.preventDefault(); + return false; + } + else if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + () => { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const dragOffset = this.dragOffsets[i]; + draggedNode.x = Math.round(this.getXCoordinate(dragOffset.x + event.clientX)); + draggedNode.y = Math.round(this.getYCoordinate(dragOffset.y + event.clientY)); + } + event.preventDefault(); + return false; + })); + } + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + if (nodeDropScope.dropElement) { + /** @type {?} */ + const offsetInfo = nodeDropScope.dropElement.offsetInfo; + nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px'; + nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px'; + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + () => { + this.destinationHtmlElements[0].style.display = this.oldDisplayStyles[0]; + this.nodeDraggingScope.shadowDragStarted = false; + })); + } + event.preventDefault(); + return; + } + if (this.modelService.isDropSource()) { + event.preventDefault(); + return; + } + if (!this.nodeDraggingScope.draggedNodes.length) { + event.preventDefault(); + return; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + () => { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const dragOffset = this.dragOffsets[i]; + draggedNode.x = this.getXCoordinate(dragOffset.x + event.clientX); + draggedNode.y = this.getYCoordinate(dragOffset.y + event.clientY); + this.resizeCanvas(draggedNode, this.draggedElements[i]); + } + event.preventDefault(); + return false; + })); + } + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.nodeDraggingScope.draggedNodes.length) { + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + () => { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + this.destinationHtmlElements[i].style.display = this.oldDisplayStyles[i]; + } + this.nodeDraggingScope.shadowDragStarted = false; + })); + } + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const dragOffset = this.dragOffsets[i]; + this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px'); + this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px'); + this.resizeCanvas(draggedNode, this.draggedElements[i]); + } + event.preventDefault(); + } + } + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + this.applyFunction((/** + * @return {?} + */ + () => { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + if (this.modelService.isDropSource()) { + return; + } + if (this.nodeDraggingScope.shadowElements.length) { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + const shadowElement = this.nodeDraggingScope.shadowElements[i]; + draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10); + draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10); + this.modelService.canvasHtmlElement.removeChild(shadowElement[0]); + } + this.nodeDraggingScope.shadowElements.length = 0; + } + if (this.nodeDraggingScope.draggedNodes.length) { + this.nodeDraggingScope.draggedNodes.length = 0; + this.draggedElements.length = 0; + this.dragOffsets.length = 0; + } + })); + } +} +if (false) { + /** @type {?} */ + FcNodeDraggingService.prototype.nodeDraggingScope; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragOffsets; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.draggedElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.destinationHtmlElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.oldDisplayStyles; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.automaticResize; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.applyFunction; +} +/** + * @record + */ +function NodeDraggingScope() { } +if (false) { + /** @type {?} */ + NodeDraggingScope.prototype.draggedNodes; + /** @type {?} */ + NodeDraggingScope.prototype.shadowElements; + /** @type {?} */ + NodeDraggingScope.prototype.shadowDragStarted; + /** @type {?} */ + NodeDraggingScope.prototype.dropElement; +} +/** + * @record + */ +function NodeDropElement() { } +if (false) { + /** @type {?|undefined} */ + NodeDropElement.prototype.offsetInfo; +} +/** + * @record + */ +function NodeDropScope() { } +if (false) { + /** @type {?} */ + NodeDropScope.prototype.dropElement; +} +/** + * @record + */ +function DropNodeInfo() { } +if (false) { + /** @type {?} */ + DropNodeInfo.prototype.node; + /** @type {?} */ + DropNodeInfo.prototype.dropTargetId; + /** @type {?} */ + DropNodeInfo.prototype.offsetX; + /** @type {?} */ + DropNodeInfo.prototype.offsetY; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +class FcEdgeDrawingService { + constructor() { + } + /** + * @param {?} pt1 + * @param {?} pt2 + * @param {?} style + * @return {?} + */ + getEdgeDAttribute(pt1, pt2, style) { + /** @type {?} */ + let dAddribute = `M ${pt1.x}, ${pt1.y} `; + if (style === FlowchartConstants.curvedStyle) { + /** @type {?} */ + const sourceTangent = this.computeEdgeSourceTangent(pt1, pt2); + /** @type {?} */ + const destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2); + dAddribute += `C ${sourceTangent.x}, ${sourceTangent.y} ${(destinationTangent.x - 50)}, ${destinationTangent.y} ${pt2.x}, ${pt2.y}`; + } + else { + dAddribute += `L ${pt2.x}, ${pt2.y}`; + } + return dAddribute; + } + /** + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + getEdgeCenter(pt1, pt2) { + return { + x: (pt1.x + pt2.x) / 2, + y: (pt1.y + pt2.y) / 2 + }; + } + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + computeEdgeTangentOffset(pt1, pt2) { + return (pt2.y - pt1.y) / 2; + } + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + computeEdgeSourceTangent(pt1, pt2) { + return { + x: pt1.x, + y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2) + }; + } + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + computeEdgeDestinationTangent(pt1, pt2) { + return { + x: pt2.x, + y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2) + }; + } +} +FcEdgeDrawingService.decorators = [ + { type: Injectable } +]; +/** @nocollapse */ +FcEdgeDrawingService.ctorParameters = () => []; + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +class FcEdgeDraggingService { + /** + * @param {?} modelValidation + * @param {?} edgeDrawingService + * @param {?} modelService + * @param {?} model + * @param {?} isValidEdgeCallback + * @param {?} applyFunction + * @param {?} dragAnimation + * @param {?} edgeStyle + */ + constructor(modelValidation, edgeDrawingService, modelService, model, isValidEdgeCallback, applyFunction, dragAnimation, edgeStyle) { + this.edgeDragging = { + isDragging: false, + dragPoint1: null, + dragPoint2: null, + shadowDragStarted: false + }; + this.draggedEdgeSource = null; + this.dragOffset = {}; + this.destinationHtmlElement = null; + this.oldDisplayStyle = ''; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.modelService = modelService; + this.model = model; + this.isValidEdgeCallback = isValidEdgeCallback || ((/** + * @return {?} + */ + () => true)); + this.applyFunction = applyFunction; + this.dragAnimation = dragAnimation; + this.edgeStyle = edgeStyle; + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + dragstart(event, connector) { + /** @type {?} */ + let swapConnector; + /** @type {?} */ + let dragLabel; + /** @type {?} */ + let prevEdge; + if (connector.type === FlowchartConstants.leftConnectorType) { + for (const edge of this.model.edges) { + if (edge === connector.id) { + swapConnector = this.modelService.connectors.getConnector(edge.source); + dragLabel = edge.label; + prevEdge = edge; + this.applyFunction((/** + * @return {?} + */ + () => { + this.modelService.edges.delete(edge); + })); + break; + } + } + } + this.edgeDragging.isDragging = true; + if (swapConnector !== undefined) { + this.draggedEdgeSource = swapConnector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id); + this.edgeDragging.dragLabel = dragLabel; + this.edgeDragging.prevEdge = prevEdge; + } + else { + this.draggedEdgeSource = connector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id); + } + /** @type {?} */ + const canvas = this.modelService.canvasHtmlElement; + if (!canvas) { + throw new Error('No canvas while edgedraggingService found.'); + } + this.dragOffset.x = -canvas.getBoundingClientRect().left; + this.dragOffset.y = -canvas.getBoundingClientRect().top; + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + /** @type {?} */ + const originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + originalEvent.dataTransfer.setData('Text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + this.destinationHtmlElement = (/** @type {?} */ (event.target)); + this.oldDisplayStyle = this.destinationHtmlElement.style.display; + this.destinationHtmlElement.style.display = 'none'; + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.shadowDragStarted = true; + } + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.edgeDragging.gElement === undefined) { + this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class')); + this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path'); + this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle'); + } + this.edgeDragging.gElement.css('display', 'block'); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + event.stopPropagation(); + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + if (this.edgeDragging.isDragging) { + if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.destinationHtmlElement !== null) { + this.destinationHtmlElement.style.display = this.oldDisplayStyle; + } + if (this.edgeDragging.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + () => { + this.edgeDragging.shadowDragStarted = false; + })); + } + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + () => { + if (this.destinationHtmlElement !== null) { + this.destinationHtmlElement.style.display = this.oldDisplayStyle; + } + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + })); + } + } + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + dragoverConnector(event, connector) { + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + event.preventDefault(); + event.stopPropagation(); + return false; + } + } + } + /** + * @param {?} event + * @return {?} + */ + dragleaveMagnet(event) { + this.edgeDragging.magnetActive = false; + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + dragoverMagnet(event, connector) { + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.magnetActive = true; + this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + event.preventDefault(); + event.stopPropagation(); + return false; + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id); + event.preventDefault(); + event.stopPropagation(); + return false; + })); + } + } + } + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + if (this.edgeDragging.isDragging) { + this.edgeDragging.isDragging = false; + this.edgeDragging.dragPoint1 = null; + this.edgeDragging.dragPoint2 = null; + this.edgeDragging.dragLabel = null; + event.stopPropagation(); + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.gElement.css('display', 'none'); + } + if (this.edgeDragging.prevEdge) { + /** @type {?} */ + const edge = this.edgeDragging.prevEdge; + this.edgeDragging.prevEdge = null; + this.applyFunction((/** + * @return {?} + */ + () => { + this.modelService.edges.putEdge(edge); + })); + } + } + } + /** + * @param {?} event + * @param {?} targetConnector + * @return {?} + */ + drop(event, targetConnector) { + if (this.edgeDragging.isDragging) { + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: targetConnector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) { + this.edgeDragging.prevEdge = null; + this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel); + event.stopPropagation(); + event.preventDefault(); + return false; + } + } + } +} +if (false) { + /** @type {?} */ + FcEdgeDraggingService.prototype.edgeDragging; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.draggedEdgeSource; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragOffset; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.destinationHtmlElement; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.oldDisplayStyle; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelValidation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.model; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.isValidEdgeCallback; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.applyFunction; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeStyle; +} +/** + * @record + */ +function EdgeDragging() { } +if (false) { + /** @type {?} */ + EdgeDragging.prototype.isDragging; + /** @type {?} */ + EdgeDragging.prototype.shadowDragStarted; + /** @type {?} */ + EdgeDragging.prototype.dragPoint1; + /** @type {?} */ + EdgeDragging.prototype.dragPoint2; + /** @type {?|undefined} */ + EdgeDragging.prototype.dragLabel; + /** @type {?|undefined} */ + EdgeDragging.prototype.prevEdge; + /** @type {?|undefined} */ + EdgeDragging.prototype.magnetActive; + /** @type {?|undefined} */ + EdgeDragging.prototype.gElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.pathElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.circleElement; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +class FcMouseOverService { + /** + * @param {?} applyFunction + */ + constructor(applyFunction) { + this.mouseoverscope = { + connector: null, + edge: null, + node: null + }; + this.applyFunction = applyFunction; + } + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + nodeMouseOver(event, node) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.mouseoverscope.node = node; + })); + } + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + nodeMouseOut(event, node) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.mouseoverscope.node = null; + })); + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + connectorMouseEnter(event, connector) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.mouseoverscope.connector = connector; + })); + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + connectorMouseLeave(event, connector) { + return this.applyFunction((/** + * @return {?} + */ + () => { + this.mouseoverscope.connector = null; + })); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseEnter(event, edge) { + this.mouseoverscope.edge = edge; + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseLeave(event, edge) { + this.mouseoverscope.edge = null; + } +} +if (false) { + /** @type {?} */ + FcMouseOverService.prototype.mouseoverscope; + /** + * @type {?} + * @private + */ + FcMouseOverService.prototype.applyFunction; +} +/** + * @record + */ +function MouseOverScope() { } +if (false) { + /** @type {?} */ + MouseOverScope.prototype.connector; + /** @type {?} */ + MouseOverScope.prototype.edge; + /** @type {?} */ + MouseOverScope.prototype.node; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +/** @type {?} */ +const regex = /(auto|scroll)/; +/** @type {?} */ +const style = (/** + * @param {?} node + * @param {?} prop + * @return {?} + */ +(node, prop) => getComputedStyle(node, null).getPropertyValue(prop)); +const ɵ0 = style; +/** @type {?} */ +const scroll = (/** + * @param {?} node + * @return {?} + */ +(node) => regex.test(style(node, 'overflow') + + style(node, 'overflow-y') + + style(node, 'overflow-x'))); +const ɵ1 = scroll; +/** @type {?} */ +const scrollparent = (/** + * @param {?} node + * @return {?} + */ +(node) => !node || node === document.body + ? document.body + : scroll(node) + ? node + : scrollparent((/** @type {?} */ (node.parentNode)))); +const ɵ2 = scrollparent; + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +/** + * @record + */ +function Rectangle() { } +if (false) { + /** @type {?} */ + Rectangle.prototype.x1; + /** @type {?} */ + Rectangle.prototype.x2; + /** @type {?} */ + Rectangle.prototype.y1; + /** @type {?} */ + Rectangle.prototype.y2; +} +class FcRectangleSelectService { + /** + * @param {?} modelService + * @param {?} selectElement + * @param {?} applyFunction + */ + constructor(modelService, selectElement, applyFunction) { + this.selectRect = { + x1: 0, + x2: 0, + y1: 0, + y2: 0 + }; + this.modelService = modelService; + this.selectElement = selectElement; + this.$canvasElement = $(this.modelService.canvasHtmlElement); + this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement)); + this.applyFunction = applyFunction; + } + /** + * @param {?} e + * @return {?} + */ + mousedown(e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && this.selectElement.hidden) { + this.selectElement.hidden = false; + /** @type {?} */ + const offset = this.$canvasElement.offset(); + this.selectRect.x1 = Math.round(e.pageX - offset.left); + this.selectRect.y1 = Math.round(e.pageY - offset.top); + this.selectRect.x2 = this.selectRect.x1; + this.selectRect.y2 = this.selectRect.y1; + this.updateSelectRect(); + } + } + /** + * @param {?} e + * @return {?} + */ + mousemove(e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + const offset = this.$canvasElement.offset(); + this.selectRect.x2 = Math.round(e.pageX - offset.left); + this.selectRect.y2 = Math.round(e.pageY - offset.top); + this.updateScroll(offset); + this.updateSelectRect(); + } + } + /** + * @private + * @param {?} offset + * @return {?} + */ + updateScroll(offset) { + /** @type {?} */ + const rect = this.$scrollParent[0].getBoundingClientRect(); + /** @type {?} */ + const bottom = rect.bottom - offset.top; + /** @type {?} */ + const right = rect.right - offset.left; + /** @type {?} */ + const top = rect.top - offset.top; + /** @type {?} */ + const left = rect.left - offset.left; + if (this.selectRect.y2 - top < 25) { + /** @type {?} */ + const topScroll = 25 - (this.selectRect.y2 - top); + /** @type {?} */ + const scroll = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll - topScroll); + } + else if (bottom - this.selectRect.y2 < 40) { + /** @type {?} */ + const bottomScroll = 40 - (bottom - this.selectRect.y2); + /** @type {?} */ + const scroll = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll + bottomScroll); + } + if (this.selectRect.x2 - left < 25) { + /** @type {?} */ + const leftScroll = 25 - (this.selectRect.x2 - left); + /** @type {?} */ + const scroll = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll - leftScroll); + } + else if (right - this.selectRect.x2 < 40) { + /** @type {?} */ + const rightScroll = 40 - (right - this.selectRect.x2); + /** @type {?} */ + const scroll = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll + rightScroll); + } + } + /** + * @param {?} e + * @return {?} + */ + mouseup(e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + const rectBox = (/** @type {?} */ (this.selectElement.getBoundingClientRect())); + this.selectElement.hidden = true; + this.selectObjects(rectBox); + } + } + /** + * @private + * @return {?} + */ + updateSelectRect() { + /** @type {?} */ + const x3 = Math.min(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + const x4 = Math.max(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + const y3 = Math.min(this.selectRect.y1, this.selectRect.y2); + /** @type {?} */ + const y4 = Math.max(this.selectRect.y1, this.selectRect.y2); + this.selectElement.style.left = x3 + 'px'; + this.selectElement.style.top = y3 + 'px'; + this.selectElement.style.width = x4 - x3 + 'px'; + this.selectElement.style.height = y4 - y3 + 'px'; + } + /** + * @private + * @param {?} rectBox + * @return {?} + */ + selectObjects(rectBox) { + this.applyFunction((/** + * @return {?} + */ + () => { + this.modelService.selectAllInRect(rectBox); + })); + } +} +if (false) { + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectRect; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$canvasElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$scrollParent; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.applyFunction; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +class NgxFlowchartComponent { + /** + * @param {?} elementRef + * @param {?} differs + * @param {?} modelValidation + * @param {?} edgeDrawingService + * @param {?} cd + * @param {?} zone + */ + constructor(elementRef, differs, modelValidation, edgeDrawingService, cd, zone) { + this.elementRef = elementRef; + this.differs = differs; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.cd = cd; + this.zone = zone; + this.flowchartConstants = FlowchartConstants; + this.nodesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + (index, item) => { + return item; + })); + this.edgesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + (index, item) => { + return item; + })); + this.arrowDefId = 'arrow-' + Math.random(); + this.arrowDefIdSelected = this.arrowDefId + '-selected'; + } + /** + * @return {?} + */ + get canvasClass() { + return FlowchartConstants.canvasClass; + } + /** + * @return {?} + */ + ngOnInit() { + if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) { + throw new Error('edgeStyle not supported.'); + } + this.nodeHeight = this.nodeHeight || 200; + this.nodeWidth = this.nodeWidth || 200; + this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint; + this.userCallbacks = this.userCallbacks || {}; + this.automaticResize = this.automaticResize || false; + for (const key of Object.keys(this.userCallbacks)) { + /** @type {?} */ + const callback = this.userCallbacks[key]; + if (typeof callback !== 'function' && key !== 'nodeCallbacks') { + throw new Error('All callbacks should be functions.'); + } + } + this.userNodeCallbacks = this.userCallbacks.nodeCallbacks; + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects, this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved, this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg')); + if (this.dropTargetId) { + this.modelService.dropTargetId = this.dropTargetId; + } + /** @type {?} */ + const applyFunction = this.zone.run.bind(this.zone); + this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction, this.automaticResize, this.dragAnimation); + this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService, this.model, this.userCallbacks.isValidEdge || null, applyFunction, this.dragAnimation, this.edgeStyle); + this.mouseoverService = new FcMouseOverService(applyFunction); + this.rectangleSelectService = new FcRectangleSelectService(this.modelService, element[0].querySelector('#select-rectangle'), applyFunction); + this.callbacks = { + nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService), + nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService), + edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService), + edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService), + edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService), + edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService), + edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService), + edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService), + nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService), + nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService), + connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService), + connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService), + nodeClicked: (/** + * @param {?} event + * @param {?} node + * @return {?} + */ + (event, node) => { + this.modelService.nodes.handleClicked(node, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + }) + }; + this.adjustCanvasSize(true); + } + /** + * @return {?} + */ + ngDoCheck() { + if (this.model) { + /** @type {?} */ + const nodesChange = this.nodesDiffer.diff(this.model.nodes); + /** @type {?} */ + const edgesChange = this.edgesDiffer.diff(this.model.edges); + /** @type {?} */ + let nodesChanged = false; + /** @type {?} */ + let edgesChanged = false; + if (nodesChange !== null) { + nodesChange.forEachAddedItem((/** + * @return {?} + */ + () => { + nodesChanged = true; + })); + nodesChange.forEachRemovedItem((/** + * @return {?} + */ + () => { + nodesChanged = true; + })); + } + if (edgesChange !== null) { + edgesChange.forEachAddedItem((/** + * @return {?} + */ + () => { + edgesChanged = true; + })); + edgesChange.forEachRemovedItem((/** + * @return {?} + */ + () => { + edgesChanged = true; + })); + } + if (nodesChanged) { + this.adjustCanvasSize(true); + } + if (nodesChanged || edgesChanged) { + this.cd.detectChanges(); + } + } + } + /** + * @param {?} edge + * @return {?} + */ + getEdgeDAttribute(edge) { + return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge), this.modelService.edges.destCoord(edge), this.edgeStyle); + } + /** + * @param {?=} fit + * @return {?} + */ + adjustCanvasSize(fit) { + /** @type {?} */ + let maxX = 0; + /** @type {?} */ + let maxY = 0; + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + (node) => { + maxX = Math.max(node.x + this.nodeWidth, maxX); + maxY = Math.max(node.y + this.nodeHeight, maxY); + })); + /** @type {?} */ + let width; + /** @type {?} */ + let height; + if (fit) { + width = maxX; + height = maxY; + } + else { + width = Math.max(maxX, element.prop('offsetWidth')); + height = Math.max(maxY, element.prop('offsetHeight')); + } + element.css('width', width + 'px'); + element.css('height', height + 'px'); + } + /** + * @param {?} event + * @return {?} + */ + canvasClick(event) { } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseDown(event, edge) { + event.stopPropagation(); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeClick(event, edge) { + this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeRemove(event, edge) { + this.modelService.edges.delete(edge); + event.stopPropagation(); + event.preventDefault(); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeEdit(event, edge) { + if (this.userCallbacks.edgeEdit) { + this.userCallbacks.edgeEdit(event, edge); + } + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeDoubleClick(event, edge) { + if (this.userCallbacks.edgeDoubleClick) { + this.userCallbacks.edgeDoubleClick(event, edge); + } + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseOver(event, edge) { + if (this.userCallbacks.edgeMouseOver) { + this.userCallbacks.edgeMouseOver(event, edge); + } + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseEnter(event, edge) { + this.mouseoverService.edgeMouseEnter(event, edge); + } + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + edgeMouseLeave(event, edge) { + this.mouseoverService.edgeMouseLeave(event, edge); + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + this.nodeDraggingService.dragover(event); + this.edgeDraggingService.dragover(event); + } + /** + * @param {?} event + * @return {?} + */ + drop(event) { + if (event.preventDefault) { + event.preventDefault(); + } + if (event.stopPropagation) { + event.stopPropagation(); + } + this.nodeDraggingService.drop(event); + } + /** + * @param {?} event + * @return {?} + */ + mousedown(event) { + this.rectangleSelectService.mousedown(event); + } + /** + * @param {?} event + * @return {?} + */ + mousemove(event) { + this.rectangleSelectService.mousemove(event); + } + /** + * @param {?} event + * @return {?} + */ + mouseup(event) { + this.rectangleSelectService.mouseup(event); + } +} +NgxFlowchartComponent.decorators = [ + { type: Component, args: [{ + selector: 'fc-canvas', + template: "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {{edgeDraggingService.edgeDragging.dragLabel}}\n
\n
\n \n
\n
\n \n
\n
\n ×\n
\n {{edge.label}}\n
\n
\n \n\n", + changeDetection: ChangeDetectionStrategy.OnPush, + styles: [":host{display:block;position:relative;width:100%;height:100%;background-size:25px 25px;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.1) 1px,transparent 1px);background-color:transparent;min-width:100%;min-height:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-canvas-container{display:block;position:relative;width:100%;height:100%}:host .fc-canvas-container svg.fc-canvas-svg{display:block;position:relative;width:100%;height:100%}:host .fc-edge{stroke:gray;stroke-width:4;transition:stroke-width .2s;fill:transparent}:host .fc-edge.fc-hover{stroke:gray;stroke-width:6;fill:transparent}:host .fc-edge.fc-selected{stroke:red;stroke-width:4;fill:transparent}:host .fc-edge.fc-active{-webkit-animation:3s linear infinite dash;animation:3s linear infinite dash;stroke-dasharray:20}:host .fc-edge.fc-dragging{pointer-events:none}:host .fc-arrow-marker polygon{stroke:gray;fill:gray}:host .fc-arrow-marker-selected polygon{stroke:red;fill:red}:host .edge-endpoint{fill:gray}:host .fc-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-edge-label{position:absolute;opacity:.8;transition:transform .2s;transform-origin:bottom left;margin:0 auto}:host .fc-edge-label .fc-edge-label-text{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;text-align:center;font-size:16px}:host .fc-edge-label .fc-edge-label-text span{cursor:default;border:solid #ff3d00;border-radius:10px;color:#ff3d00;background-color:#fff;padding:3px 5px}:host .fc-edge-label .fc-nodeedit{top:-30px;right:14px}:host .fc-edge-label .fc-nodedelete{top:-30px;right:-13px}:host .fc-edge-label.fc-hover{transform:scale(1.25)}:host .fc-edge-label.fc-edit .fc-edge-label-text span,:host .fc-edge-label.fc-selected .fc-edge-label-text span{border:solid red;color:#fff;font-weight:600;background-color:red}:host .fc-select-rectangle{border:2px dashed #5262ff;position:absolute;background:rgba(20,125,255,.1);z-index:2}@-webkit-keyframes dash{from{stroke-dashoffset:500}}@keyframes dash{from{stroke-dashoffset:500}}:host ::ng-deep .fc-nodeedit{display:none;font-size:15px}:host ::ng-deep .fc-nodedelete{display:none;font-size:18px}:host ::ng-deep .fc-edit .fc-nodedelete,:host ::ng-deep .fc-edit .fc-nodeedit{display:block;position:absolute;border:2px solid #eee;border-radius:50%;font-weight:600;line-height:20px;height:20px;padding-top:2px;width:22px;background:#494949;color:#fff;text-align:center;vertical-align:bottom;cursor:pointer}:host ::ng-deep .fc-edit .fc-nodeedit{top:-24px;right:16px}:host ::ng-deep .fc-edit .fc-nodedelete{top:-24px;right:-13px}"] + }] } +]; +/** @nocollapse */ +NgxFlowchartComponent.ctorParameters = () => [ + { type: ElementRef }, + { type: IterableDiffers }, + { type: FcModelValidationService }, + { type: FcEdgeDrawingService }, + { type: ChangeDetectorRef }, + { type: NgZone } +]; +NgxFlowchartComponent.propDecorators = { + canvasClass: [{ type: HostBinding, args: ['attr.class',] }], + model: [{ type: Input }], + selectedObjects: [{ type: Input }], + edgeStyle: [{ type: Input }], + userCallbacks: [{ type: Input }], + automaticResize: [{ type: Input }], + dragAnimation: [{ type: Input }], + nodeWidth: [{ type: Input }], + nodeHeight: [{ type: Input }], + dropTargetId: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }], + mousemove: [{ type: HostListener, args: ['mousemove', ['$event'],] }], + mouseup: [{ type: HostListener, args: ['mouseup', ['$event'],] }] +}; +if (false) { + /** @type {?} */ + NgxFlowchartComponent.prototype.model; + /** @type {?} */ + NgxFlowchartComponent.prototype.selectedObjects; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeStyle; + /** @type {?} */ + NgxFlowchartComponent.prototype.userCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.automaticResize; + /** @type {?} */ + NgxFlowchartComponent.prototype.dragAnimation; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeWidth; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeHeight; + /** @type {?} */ + NgxFlowchartComponent.prototype.dropTargetId; + /** @type {?} */ + NgxFlowchartComponent.prototype.callbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.userNodeCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.modelService; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.mouseoverService; + /** @type {?} */ + NgxFlowchartComponent.prototype.rectangleSelectService; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefId; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefIdSelected; + /** @type {?} */ + NgxFlowchartComponent.prototype.flowchartConstants; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.nodesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.edgesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.differs; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.modelValidation; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.cd; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.zone; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +class FcMagnetDirective { + /** + * @param {?} elementRef + */ + constructor(elementRef) { + this.elementRef = elementRef; + } + /** + * @return {?} + */ + ngOnInit() { + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.magnetClass); + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + return this.callbacks.edgeDragoverMagnet(event, this.connector); + } + /** + * @param {?} event + * @return {?} + */ + dragleave(event) { + this.callbacks.edgeDragleaveMagnet(event); + } + /** + * @param {?} event + * @return {?} + */ + drop(event) { + return this.callbacks.edgeDrop(event, this.connector); + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + this.callbacks.edgeDragend(event); + } } -NgxFlowchartService.decorators = [ - { type: Injectable, args: [{ - providedIn: 'root' +FcMagnetDirective.decorators = [ + { type: Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-magnet]' },] } ]; /** @nocollapse */ -NgxFlowchartService.ctorParameters = () => []; -/** @nocollapse */ NgxFlowchartService.ngInjectableDef = ɵɵdefineInjectable({ factory: function NgxFlowchartService_Factory() { return new NgxFlowchartService(); }, token: NgxFlowchartService, providedIn: "root" }); +FcMagnetDirective.ctorParameters = () => [ + { type: ElementRef } +]; +FcMagnetDirective.propDecorators = { + callbacks: [{ type: Input }], + connector: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + dragleave: [{ type: HostListener, args: ['dragleave', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }] +}; +if (false) { + /** @type {?} */ + FcMagnetDirective.prototype.callbacks; + /** @type {?} */ + FcMagnetDirective.prototype.connector; + /** @type {?} */ + FcMagnetDirective.prototype.elementRef; +} /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ -class NgxFlowchartComponent { - constructor() { } +class FcConnectorDirective { + /** + * @param {?} elementRef + */ + constructor(elementRef) { + this.elementRef = elementRef; + } + /** + * @return {?} + */ + ngOnInit() { + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.connectorClass); + if (this.modelservice.isEditable()) { + element.attr('draggable', 'true'); + this.updateConnectorClass(); + } + this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]); + } + /** + * @param {?} changes + * @return {?} + */ + ngOnChanges(changes) { + /** @type {?} */ + let updateConnector = false; + for (const propName of Object.keys(changes)) { + /** @type {?} */ + const change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (propName === 'mouseOverConnector') { + updateConnector = true; + } + } + } + if (updateConnector && this.modelservice.isEditable()) { + this.updateConnectorClass(); + } + } + /** + * @private + * @return {?} + */ + updateConnectorClass() { + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + if (this.connector === this.mouseOverConnector) { + element.addClass(FlowchartConstants.hoverClass); + } + else { + element.removeClass(FlowchartConstants.hoverClass); + } + } + /** + * @param {?} event + * @return {?} + */ + dragover(event) { + // Skip - conflict with magnet + /* if (this.modelservice.isEditable()) { + return this.callbacks.edgeDragoverConnector(event, this.connector); + }*/ + } + /** + * @param {?} event + * @return {?} + */ + drop(event) { + if (this.modelservice.isEditable()) { + return this.callbacks.edgeDrop(event, this.connector); + } + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragend(event); + } + } + /** + * @param {?} event + * @return {?} + */ + dragstart(event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragstart(event, this.connector); + } + } + /** + * @param {?} event + * @return {?} + */ + mouseenter(event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseEnter(event, this.connector); + } + } + /** + * @param {?} event + * @return {?} + */ + mouseleave(event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseLeave(event, this.connector); + } + } +} +FcConnectorDirective.decorators = [ + { type: Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-connector]' + },] } +]; +/** @nocollapse */ +FcConnectorDirective.ctorParameters = () => [ + { type: ElementRef } +]; +FcConnectorDirective.propDecorators = { + callbacks: [{ type: Input }], + modelservice: [{ type: Input }], + connector: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }], + dragstart: [{ type: HostListener, args: ['dragstart', ['$event'],] }], + mouseenter: [{ type: HostListener, args: ['mouseenter', ['$event'],] }], + mouseleave: [{ type: HostListener, args: ['mouseleave', ['$event'],] }] +}; +if (false) { + /** @type {?} */ + FcConnectorDirective.prototype.callbacks; + /** @type {?} */ + FcConnectorDirective.prototype.modelservice; + /** @type {?} */ + FcConnectorDirective.prototype.connector; + /** @type {?} */ + FcConnectorDirective.prototype.mouseOverConnector; + /** @type {?} */ + FcConnectorDirective.prototype.elementRef; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +class FcNodeContainerComponent { + /** + * @param {?} nodeComponentConfig + * @param {?} elementRef + * @param {?} componentFactoryResolver + */ + constructor(nodeComponentConfig, elementRef, componentFactoryResolver) { + this.nodeComponentConfig = nodeComponentConfig; + this.elementRef = elementRef; + this.componentFactoryResolver = componentFactoryResolver; + } + /** + * @return {?} + */ + get nodeId() { + return this.node.id; + } + /** + * @return {?} + */ + get top() { + return this.node.y + 'px'; + } + /** + * @return {?} + */ + get left() { + return this.node.x + 'px'; + } + /** + * @return {?} + */ + ngOnInit() { + if (!this.userNodeCallbacks) { + this.userNodeCallbacks = {}; + } + this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || ((/** + * @return {?} + */ + () => { })); + this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || ((/** + * @return {?} + */ + () => { })); + this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || ((/** + * @return {?} + */ + () => { })); + this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || ((/** + * @return {?} + */ + () => { })); + this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || ((/** + * @return {?} + */ + () => { })); + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.nodeClass); + if (!this.node.readonly) { + element.attr('draggable', 'true'); + } + this.updateNodeClass(); + this.modelservice.nodes.setHtmlElement(this.node.id, element[0]); + this.nodeContentContainer.clear(); + /** @type {?} */ + const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType); + /** @type {?} */ + const componentRef = this.nodeContentContainer.createComponent(componentFactory); + this.nodeComponent = componentRef.instance; + this.nodeComponent.callbacks = this.callbacks; + this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks; + this.nodeComponent.node = this.node; + this.nodeComponent.modelservice = this.modelservice; + this.updateNodeComponent(); + } + /** + * @param {?} changes + * @return {?} + */ + ngOnChanges(changes) { + /** @type {?} */ + let updateNode = false; + for (const propName of Object.keys(changes)) { + /** @type {?} */ + const change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) { + updateNode = true; + } + } + } + if (updateNode) { + this.updateNodeClass(); + this.updateNodeComponent(); + } + } + /** + * @private + * @return {?} + */ + updateNodeClass() { + /** @type {?} */ + const element = $(this.elementRef.nativeElement); + this.toggleClass(element, FlowchartConstants.selectedClass, this.selected); + this.toggleClass(element, FlowchartConstants.editClass, this.edit); + this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse); + this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging); + } + /** + * @private + * @return {?} + */ + updateNodeComponent() { + this.nodeComponent.selected = this.selected; + this.nodeComponent.edit = this.edit; + this.nodeComponent.underMouse = this.underMouse; + this.nodeComponent.mouseOverConnector = this.mouseOverConnector; + this.nodeComponent.dragging = this.dragging; + } + /** + * @private + * @param {?} element + * @param {?} clazz + * @param {?} set + * @return {?} + */ + toggleClass(element, clazz, set) { + if (set) { + element.addClass(clazz); + } + else { + element.removeClass(clazz); + } + } + /** + * @param {?} event + * @return {?} + */ + mousedown(event) { + event.stopPropagation(); + } + /** + * @param {?} event + * @return {?} + */ + dragstart(event) { + if (!this.node.readonly) { + this.callbacks.nodeDragstart(event, this.node); + } + } + /** + * @param {?} event + * @return {?} + */ + dragend(event) { + if (!this.node.readonly) { + this.callbacks.nodeDragend(event); + } + } + /** + * @param {?} event + * @return {?} + */ + click(event) { + if (!this.node.readonly) { + this.callbacks.nodeClicked(event, this.node); + } + } + /** + * @param {?} event + * @return {?} + */ + mouseover(event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOver(event, this.node); + } + } + /** + * @param {?} event + * @return {?} + */ + mouseout(event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOut(event, this.node); + } + } +} +FcNodeContainerComponent.decorators = [ + { type: Component, args: [{ + selector: 'fc-node', + template: '', + styles: [":host{position:absolute;z-index:1}:host.fc-dragging{z-index:10}:host ::ng-deep .fc-leftConnectors,:host ::ng-deep .fc-rightConnectors{position:absolute;top:0;height:100%;display:flex;flex-direction:column;z-index:-10}:host ::ng-deep .fc-leftConnectors .fc-magnet,:host ::ng-deep .fc-rightConnectors .fc-magnet{align-items:center}:host ::ng-deep .fc-leftConnectors{left:-20px}:host ::ng-deep .fc-rightConnectors{right:-20px}:host ::ng-deep .fc-magnet{display:flex;flex-grow:1;height:60px;justify-content:center}:host ::ng-deep .fc-connector{width:18px;height:18px;border:10px solid transparent;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box;border-radius:50%;background-color:#f7a789;color:#fff;pointer-events:all}:host ::ng-deep .fc-connector.fc-hover{background-color:#000}"] + }] } +]; +/** @nocollapse */ +FcNodeContainerComponent.ctorParameters = () => [ + { type: undefined, decorators: [{ type: Inject, args: [FC_NODE_COMPONENT_CONFIG,] }] }, + { type: ElementRef }, + { type: ComponentFactoryResolver } +]; +FcNodeContainerComponent.propDecorators = { + callbacks: [{ type: Input }], + userNodeCallbacks: [{ type: Input }], + node: [{ type: Input }], + selected: [{ type: Input }], + edit: [{ type: Input }], + underMouse: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + modelservice: [{ type: Input }], + dragging: [{ type: Input }], + nodeId: [{ type: HostBinding, args: ['attr.id',] }], + top: [{ type: HostBinding, args: ['style.top',] }], + left: [{ type: HostBinding, args: ['style.left',] }], + nodeContentContainer: [{ type: ViewChild, args: ['nodeContent', { read: ViewContainerRef, static: true },] }], + mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }], + dragstart: [{ type: HostListener, args: ['dragstart', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }], + click: [{ type: HostListener, args: ['click', ['$event'],] }], + mouseover: [{ type: HostListener, args: ['mouseover', ['$event'],] }], + mouseout: [{ type: HostListener, args: ['mouseout', ['$event'],] }] +}; +if (false) { + /** @type {?} */ + FcNodeContainerComponent.prototype.callbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.node; + /** @type {?} */ + FcNodeContainerComponent.prototype.selected; + /** @type {?} */ + FcNodeContainerComponent.prototype.edit; + /** @type {?} */ + FcNodeContainerComponent.prototype.underMouse; + /** @type {?} */ + FcNodeContainerComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeContainerComponent.prototype.modelservice; + /** @type {?} */ + FcNodeContainerComponent.prototype.dragging; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeComponent; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeContentContainer; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.nodeComponentConfig; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.componentFactoryResolver; +} +/** + * @abstract + */ +class FcNodeComponent { + constructor() { + this.flowchartConstants = FlowchartConstants; + } /** * @return {?} */ ngOnInit() { } } -NgxFlowchartComponent.decorators = [ +FcNodeComponent.propDecorators = { + callbacks: [{ type: Input }], + userNodeCallbacks: [{ type: Input }], + node: [{ type: Input }], + selected: [{ type: Input }], + edit: [{ type: Input }], + underMouse: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + modelservice: [{ type: Input }], + dragging: [{ type: Input }] +}; +if (false) { + /** @type {?} */ + FcNodeComponent.prototype.callbacks; + /** @type {?} */ + FcNodeComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeComponent.prototype.node; + /** @type {?} */ + FcNodeComponent.prototype.selected; + /** @type {?} */ + FcNodeComponent.prototype.edit; + /** @type {?} */ + FcNodeComponent.prototype.underMouse; + /** @type {?} */ + FcNodeComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeComponent.prototype.modelservice; + /** @type {?} */ + FcNodeComponent.prototype.dragging; + /** @type {?} */ + FcNodeComponent.prototype.flowchartConstants; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +class DefaultFcNodeComponent extends FcNodeComponent { + constructor() { + super(); + } +} +DefaultFcNodeComponent.decorators = [ { type: Component, args: [{ - selector: 'fc-canvas', - template: ` -

- ngx-flowchart works! -

- ` + selector: 'fc-default-node', + template: "\n
\n
\n

{{ node.name }}

\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n ×\n
\n\n", + styles: [":host .fc-node-overlay{position:absolute;pointer-events:none;left:0;top:0;right:0;bottom:0;background-color:#000;opacity:0}:host :host-context(.fc-hover) .fc-node-overlay{opacity:.25;transition:opacity .2s}:host :host-context(.fc-selected) .fc-node-overlay{opacity:.25}:host .innerNode{display:flex;justify-content:center;align-items:center;min-width:100px;border-radius:5px;background-color:#f15b26;color:#fff;font-size:16px;pointer-events:none}:host .innerNode p{padding:0 15px;text-align:center}"] }] } ]; /** @nocollapse */ -NgxFlowchartComponent.ctorParameters = () => []; +DefaultFcNodeComponent.ctorParameters = () => []; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ +const ɵ0$1 = { + nodeComponentType: DefaultFcNodeComponent +}; class NgxFlowchartModule { } NgxFlowchartModule.decorators = [ { type: NgModule, args: [{ - declarations: [NgxFlowchartComponent], - imports: [], - exports: [NgxFlowchartComponent] + entryComponents: [ + DefaultFcNodeComponent + ], + declarations: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + FcNodeContainerComponent, + DefaultFcNodeComponent], + providers: [ + FcModelValidationService, + FcEdgeDrawingService, + { + provide: FC_NODE_COMPONENT_CONFIG, + useValue: ɵ0$1 + } + ], + imports: [ + CommonModule + ], + exports: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + DefaultFcNodeComponent] },] } ]; @@ -65,5 +3600,5 @@ NgxFlowchartModule.decorators = [ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ -export { NgxFlowchartComponent, NgxFlowchartModule, NgxFlowchartService }; +export { FC_NODE_COMPONENT_CONFIG, FcNodeComponent, FlowchartConstants, ModelvalidationError, NgxFlowchartComponent, NgxFlowchartModule, fcTopSort, FcNodeContainerComponent as ɵa, FcModelValidationService as ɵb, FcEdgeDrawingService as ɵc, DefaultFcNodeComponent as ɵd, FcMagnetDirective as ɵe, FcConnectorDirective as ɵf }; //# sourceMappingURL=ngx-flowchart.js.map diff --git a/dist/ngx-flowchart/fesm2015/ngx-flowchart.js.map b/dist/ngx-flowchart/fesm2015/ngx-flowchart.js.map index 77b13d3..94e0bc8 100644 --- a/dist/ngx-flowchart/fesm2015/ngx-flowchart.js.map +++ b/dist/ngx-flowchart/fesm2015/ngx-flowchart.js.map @@ -1 +1 @@ -{"version":3,"file":"ngx-flowchart.js","sources":["ng://ngx-flowchart/lib/ngx-flowchart.service.ts","ng://ngx-flowchart/lib/ngx-flowchart.component.ts","ng://ngx-flowchart/lib/ngx-flowchart.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxFlowchartService {\n\n constructor() { }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'fc-canvas',\n template: `\n

\n ngx-flowchart works!\n

\n `,\n styles: []\n})\nexport class NgxFlowchartComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { NgxFlowchartComponent } from './ngx-flowchart.component';\n\n@NgModule({\n declarations: [NgxFlowchartComponent],\n imports: [\n ],\n exports: [NgxFlowchartComponent]\n})\nexport class NgxFlowchartModule { }\n"],"names":[],"mappings":";;;;;;AAAA,MAKa,mBAAmB;IAE9B,iBAAiB;;;YALlB,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;;;;;;;;ACJD,MAWa,qBAAqB;IAEhC,iBAAiB;;;;IAEjB,QAAQ;KACP;;;YAdF,SAAS,SAAC;gBACT,QAAQ,EAAE,WAAW;gBACrB,QAAQ,EAAE;;;;GAIT;aAEF;;;;;;;;;ACVD,MASa,kBAAkB;;;YAN9B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;gBACrC,OAAO,EAAE,EACR;gBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;aACjC;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"ngx-flowchart.js","sources":["ng://ngx-flowchart/lib/ngx-flowchart.models.ts","ng://ngx-flowchart/lib/model.service.ts","ng://ngx-flowchart/lib/modelvalidation.service.ts","ng://ngx-flowchart/lib/node-dragging.service.ts","ng://ngx-flowchart/lib/edge-drawing.service.ts","ng://ngx-flowchart/lib/edge-dragging.service.ts","ng://ngx-flowchart/lib/mouseover.service.ts","ng://ngx-flowchart/lib/scrollparent.ts","ng://ngx-flowchart/lib/rectangleselect.service.ts","ng://ngx-flowchart/lib/ngx-flowchart.component.ts","ng://ngx-flowchart/lib/magnet.directive.ts","ng://ngx-flowchart/lib/connector.directive.ts","ng://ngx-flowchart/lib/node.component.ts","ng://ngx-flowchart/lib/default-node.component.ts","ng://ngx-flowchart/lib/ngx-flowchart.module.ts"],"sourcesContent":["import { Observable } from 'rxjs';\nimport { InjectionToken, Type } from '@angular/core';\nimport { FcNodeComponent } from './node.component';\n\nexport const FC_NODE_COMPONENT_CONFIG = new InjectionToken('fc-node.component.config');\n\nexport interface FcNodeComponentConfig {\n nodeComponentType: Type;\n}\n\nconst htmlPrefix = 'fc';\nconst leftConnectorType = 'leftConnector';\nconst rightConnectorType = 'rightConnector';\n\nexport const FlowchartConstants = {\n htmlPrefix,\n leftConnectorType,\n rightConnectorType,\n curvedStyle: 'curved',\n lineStyle: 'line',\n dragAnimationRepaint: 'repaint',\n dragAnimationShadow: 'shadow',\n canvasClass: htmlPrefix + '-canvas',\n selectedClass: htmlPrefix + '-selected',\n editClass: htmlPrefix + '-edit',\n activeClass: htmlPrefix + '-active',\n hoverClass: htmlPrefix + '-hover',\n draggingClass: htmlPrefix + '-dragging',\n edgeClass: htmlPrefix + '-edge',\n edgeLabelClass: htmlPrefix + '-edge-label',\n connectorClass: htmlPrefix + '-connector',\n magnetClass: htmlPrefix + '-magnet',\n nodeClass: htmlPrefix + '-node',\n nodeOverlayClass: htmlPrefix + '-node-overlay',\n leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's',\n rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's',\n canvasResizeThreshold: 200,\n canvasResizeStep: 200\n};\n\n\nexport interface FcCoords {\n x?: number;\n y?: number;\n}\n\nexport interface FcOffset {\n top: number;\n left: number;\n}\n\nexport interface FcRectBox {\n top: number;\n left: number;\n right: number;\n bottom: number;\n}\n\nexport interface FcConnector {\n id: string;\n type: string;\n}\n\nexport interface FcNode extends FcCoords {\n id: string;\n name: string;\n connectors: Array;\n readonly?: boolean;\n [key: string]: any;\n}\n\nexport interface FcEdge {\n label?: string;\n source?: string;\n destination?: string;\n active?: boolean;\n}\n\nexport interface FcItemInfo {\n node?: FcNode;\n edge?: FcEdge;\n}\n\nexport interface FcModel {\n nodes: Array;\n edges: Array;\n}\n\nexport interface UserCallbacks {\n dropNode?: (event: Event, node: FcNode) => void;\n createEdge?: (event: Event, edge: FcEdge) => Observable;\n edgeAdded?: (edge: FcEdge) => void;\n nodeRemoved?: (node: FcNode) => void;\n edgeRemoved?: (edge: FcEdge) => void;\n edgeDoubleClick?: (event: MouseEvent, edge: FcEdge) => void;\n edgeMouseOver?: (event: MouseEvent, edge: FcEdge) => void;\n isValidEdge?: (source: FcConnector, destination: FcConnector) => boolean;\n edgeEdit?: (event: Event, edge: FcEdge) => void;\n nodeCallbacks?: UserNodeCallbacks;\n}\n\nexport interface UserNodeCallbacks {\n nodeEdit?: (event: MouseEvent, node: FcNode) => void;\n doubleClick?: (event: MouseEvent, node: FcNode) => void;\n mouseDown?: (event: MouseEvent, node: FcNode) => void;\n mouseEnter?: (event: MouseEvent, node: FcNode) => void;\n mouseLeave?: (event: MouseEvent, node: FcNode) => void;\n}\n\nexport interface FcCallbacks {\n nodeDragstart: (event: DragEvent, node: FcNode) => void;\n nodeDragend: (event: DragEvent) => void;\n edgeDragstart: (event: DragEvent, connector: FcConnector) => void;\n edgeDragend: (event: DragEvent) => void;\n edgeDrop: (event: DragEvent, targetConnector: FcConnector) => boolean;\n edgeDragoverConnector: (event: DragEvent, connector: FcConnector) => boolean;\n edgeDragoverMagnet: (event: DragEvent, connector: FcConnector) => boolean;\n edgeDragleaveMagnet: (event: DragEvent) => void;\n nodeMouseOver: (event: MouseEvent, node: FcNode) => void;\n nodeMouseOut: (event: MouseEvent, node: FcNode) => void;\n connectorMouseEnter: (event: MouseEvent, connector: FcConnector) => void;\n connectorMouseLeave: (event: MouseEvent, connector: FcConnector) => void;\n nodeClicked: (event: MouseEvent, node: FcNode) => void;\n}\n\nexport interface FcAdjacentList {\n [id: string]: {\n incoming: number;\n outgoing: Array;\n };\n}\n\nexport class ModelvalidationError extends Error {\n constructor(message: string) {\n super(message);\n }\n}\n\nexport function fcTopSort(graph: FcModel): Array | null {\n const adjacentList: FcAdjacentList = {};\n graph.nodes.forEach((node) => {\n adjacentList[node.id] = {incoming: 0, outgoing: []};\n });\n graph.edges.forEach((edge) => {\n const sourceNode = graph.nodes.filter((node) => {\n return node.connectors.some((connector) => {\n return connector.id === edge.source;\n });\n })[0];\n const destinationNode = graph.nodes.filter((node) => {\n return node.connectors.some((connector) => {\n return connector.id === edge.destination;\n });\n })[0];\n adjacentList[sourceNode.id].outgoing.push(destinationNode.id);\n adjacentList[destinationNode.id].incoming++;\n });\n const orderedNodes: string[] = [];\n const sourceNodes: string[] = [];\n for (const node of Object.keys(adjacentList)) {\n const edges = adjacentList[node];\n if (edges.incoming === 0) {\n sourceNodes.push(node);\n }\n }\n while (sourceNodes.length !== 0) {\n const sourceNode = sourceNodes.pop();\n for (let i = 0; i < adjacentList[sourceNode].outgoing.length; i++) {\n const destinationNode = adjacentList[sourceNode].outgoing[i];\n adjacentList[destinationNode].incoming--;\n if (adjacentList[destinationNode].incoming === 0) {\n sourceNodes.push(destinationNode);\n }\n adjacentList[sourceNode].outgoing.splice(i, 1);\n i--;\n }\n orderedNodes.push(sourceNode);\n }\n let hasEdges = false;\n for (const node of Object.keys(adjacentList)) {\n const edges = adjacentList[node];\n if (edges.incoming !== 0) {\n hasEdges = true;\n }\n }\n if (hasEdges) {\n return null;\n } else {\n return orderedNodes;\n }\n}\n","import { FcModelValidationService } from './modelvalidation.service';\nimport { FcConnector, FcCoords, FcEdge, FcItemInfo, FcModel, FcNode, FcRectBox } from './ngx-flowchart.models';\nimport { Observable, of } from 'rxjs';\nimport { ChangeDetectorRef } from '@angular/core';\n\nexport class FcModelService {\n\n modelValidation: FcModelValidationService;\n model: FcModel;\n cd: ChangeDetectorRef;\n selectedObjects: any[];\n\n connectorsHtmlElements: HtmlElementMap = {};\n nodesHtmlElements: HtmlElementMap = {};\n canvasHtmlElement: HTMLElement = null;\n dragImage: HTMLImageElement = null;\n svgHtmlElement: SVGElement = null;\n\n dropNode: (event: Event, node: FcNode) => void;\n createEdge: (event: Event, edge: FcEdge) => Observable;\n edgeAddedCallback: (edge: FcEdge) => void;\n nodeRemovedCallback: (node: FcNode) => void;\n edgeRemovedCallback: (edge: FcEdge) => void;\n\n dropTargetId: string;\n\n connectors: ConnectorsModel;\n nodes: NodesModel;\n edges: EdgesModel;\n\n constructor(modelValidation: FcModelValidationService,\n model: FcModel,\n cd: ChangeDetectorRef,\n selectedObjects: any[],\n dropNode: (event: Event, node: FcNode) => void,\n createEdge: (event: Event, edge: FcEdge) => Observable,\n edgeAddedCallback: (edge: FcEdge) => void,\n nodeRemovedCallback: (node: FcNode) => void,\n edgeRemovedCallback: (edge: FcEdge) => void,\n canvasHtmlElement: HTMLElement,\n svgHtmlElement: SVGElement) {\n\n this.modelValidation = modelValidation;\n this.model = model;\n this.cd = cd;\n this.canvasHtmlElement = canvasHtmlElement;\n this.svgHtmlElement = svgHtmlElement;\n this.modelValidation.validateModel(this.model);\n this.selectedObjects = selectedObjects;\n\n this.dropNode = dropNode || (() => {});\n this.createEdge = createEdge || (() => of({label: 'label'}));\n this.edgeAddedCallback = edgeAddedCallback || (() => {});\n this.nodeRemovedCallback = nodeRemovedCallback || (() => {});\n this.edgeRemovedCallback = edgeRemovedCallback || (() => {});\n\n this.connectors = new ConnectorsModel(this);\n this.nodes = new NodesModel(this);\n this.edges = new EdgesModel(this);\n }\n\n public detectChanges() {\n setTimeout(() => {\n this.cd.detectChanges();\n }, 0);\n }\n\n public selectObject(object: any) {\n if (this.isEditable()) {\n if (this.selectedObjects.indexOf(object) === -1) {\n this.selectedObjects.push(object);\n }\n }\n }\n\n public deselectObject(object: any) {\n if (this.isEditable()) {\n const index = this.selectedObjects.indexOf(object);\n if (index === -1) {\n throw new Error('Tried to deselect an unselected object');\n }\n this.selectedObjects.splice(index, 1);\n }\n }\n\n public toggleSelectedObject(object: any) {\n if (this.isSelectedObject(object)) {\n this.deselectObject(object);\n } else {\n this.selectObject(object);\n }\n }\n\n public isSelectedObject(object: any): boolean {\n return this.selectedObjects.indexOf(object) !== -1;\n }\n\n public selectAll() {\n this.model.nodes.forEach(node => {\n if (!node.readonly) {\n this.nodes.select(node);\n }\n });\n this.model.edges.forEach(edge => {\n this.edges.select(edge);\n });\n this.detectChanges();\n }\n\n public deselectAll() {\n this.selectedObjects.splice(0, this.selectedObjects.length);\n this.detectChanges();\n }\n\n public isEditObject(object: any): boolean {\n return this.selectedObjects.length === 1 &&\n this.selectedObjects.indexOf(object) !== -1;\n }\n\n private inRectBox(x: number, y: number, rectBox: FcRectBox): boolean {\n return x >= rectBox.left && x <= rectBox.right &&\n y >= rectBox.top && y <= rectBox.bottom;\n }\n\n public getItemInfoAtPoint(x: number, y: number): FcItemInfo {\n return {\n node: this.getNodeAtPoint(x, y),\n edge: this.getEdgeAtPoint(x, y)\n };\n }\n\n public getNodeAtPoint(x: number, y: number): FcNode {\n for (const node of this.model.nodes) {\n const element = this.nodes.getHtmlElement(node.id);\n const nodeElementBox = element.getBoundingClientRect();\n if (x >= nodeElementBox.left && x <= nodeElementBox.right\n && y >= nodeElementBox.top && y <= nodeElementBox.bottom) {\n return node;\n }\n }\n return null;\n }\n\n public getEdgeAtPoint(x: number, y: number): FcEdge {\n const element = document.elementFromPoint(x, y);\n const id = element.id;\n let edgeIndex = -1;\n if (id) {\n if (id.startsWith('fc-edge-path-')) {\n edgeIndex = Number(id.substring('fc-edge-path-'.length));\n } else if (id.startsWith('fc-edge-label-')) {\n edgeIndex = Number(id.substring('fc-edge-label-'.length));\n }\n }\n if (edgeIndex > -1) {\n return this.model.edges[edgeIndex];\n }\n return null;\n }\n\n public selectAllInRect(rectBox: FcRectBox) {\n this.model.nodes.forEach((value) => {\n const element = this.nodes.getHtmlElement(value.id);\n const nodeElementBox = element.getBoundingClientRect();\n if (!value.readonly) {\n const x = nodeElementBox.left + nodeElementBox.width / 2;\n const y = nodeElementBox.top + nodeElementBox.height / 2;\n if (this.inRectBox(x, y, rectBox)) {\n this.nodes.select(value);\n } else {\n if (this.nodes.isSelected(value)) {\n this.nodes.deselect(value);\n }\n }\n }\n });\n const canvasElementBox = this.canvasHtmlElement.getBoundingClientRect();\n this.model.edges.forEach((value) => {\n const start = this.edges.sourceCoord(value);\n const end = this.edges.destCoord(value);\n const x = (start.x + end.x) / 2 + canvasElementBox.left;\n const y = (start.y + end.y) / 2 + canvasElementBox.top;\n if (this.inRectBox(x, y, rectBox)) {\n this.edges.select(value);\n } else {\n if (this.edges.isSelected(value)) {\n this.edges.deselect(value);\n }\n }\n });\n }\n\n public deleteSelected() {\n const edgesToDelete = this.edges.getSelectedEdges();\n edgesToDelete.forEach((edge) => {\n this.edges.delete(edge);\n });\n const nodesToDelete = this.nodes.getSelectedNodes();\n nodesToDelete.forEach((node) => {\n this.nodes.delete(node);\n });\n }\n\n public isEditable(): boolean {\n return this.dropTargetId === undefined;\n }\n\n public isDropSource(): boolean {\n return this.dropTargetId !== undefined;\n }\n\n public getDragImage(): HTMLImageElement {\n if (!this.dragImage) {\n this.dragImage = new Image();\n this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n this.dragImage.style.visibility = 'hidden';\n }\n return this.dragImage;\n }\n\n public registerCallbacks(edgeAddedCallback: (edge: FcEdge) => void,\n nodeRemovedCallback: (node: FcNode) => void,\n edgeRemovedCallback: (edge: FcEdge) => void) {\n this.edgeAddedCallback = edgeAddedCallback;\n this.nodeRemovedCallback = nodeRemovedCallback;\n this.edgeRemovedCallback = edgeRemovedCallback;\n }\n\n}\n\ninterface HtmlElementMap { [id: string]: HTMLElement; }\n\nabstract class AbstractFcModel {\n\n modelService: FcModelService;\n\n protected constructor(modelService: FcModelService) {\n this.modelService = modelService;\n }\n\n public select(object: T) {\n this.modelService.selectObject(object);\n }\n\n public deselect(object: T) {\n this.modelService.deselectObject(object);\n }\n\n public toggleSelected(object: T) {\n this.modelService.toggleSelectedObject(object);\n }\n\n public isSelected(object: T): boolean {\n return this.modelService.isSelectedObject(object);\n }\n\n public isEdit(object: T): boolean {\n return this.modelService.isEditObject(object);\n }\n}\n\nclass ConnectorsModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public getConnector(connectorId: string): FcConnector {\n const model = this.modelService.model;\n for (const node of model.nodes) {\n for (const connector of node.connectors) {\n if (connector.id === connectorId) {\n return connector;\n }\n }\n }\n }\n\n public getHtmlElement(connectorId: string): HTMLElement {\n return this.modelService.connectorsHtmlElements[connectorId];\n }\n\n public setHtmlElement(connectorId: string, element: HTMLElement) {\n this.modelService.connectorsHtmlElements[connectorId] = element;\n this.modelService.detectChanges();\n }\n\n private _getCoords(connectorId: string, centered?: boolean): FcCoords {\n const element = this.getHtmlElement(connectorId);\n const canvas = this.modelService.canvasHtmlElement;\n if (element === null || element === undefined || canvas === null) {\n return {x: 0, y: 0};\n }\n const connectorElementBox = element.getBoundingClientRect();\n const canvasElementBox = canvas.getBoundingClientRect();\n let coords: FcCoords = {\n x: connectorElementBox.left - canvasElementBox.left,\n y: connectorElementBox.top - canvasElementBox.top\n };\n if (centered) {\n coords = {\n x: Math.round(coords.x + element.offsetWidth / 2),\n y: Math.round(coords.y + element.offsetHeight / 2)\n };\n }\n return coords;\n }\n\n public getCoords(connectorId: string): FcCoords {\n return this._getCoords(connectorId, false);\n }\n\n public getCenteredCoord(connectorId: string): FcCoords {\n return this._getCoords(connectorId, true);\n }\n}\n\nclass NodesModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public getConnectorsByType(node: FcNode, type: string): Array {\n return node.connectors.filter((connector) => {\n return connector.type === type;\n });\n }\n\n private _addConnector(node: FcNode, connector: FcConnector) {\n node.connectors.push(connector);\n try {\n this.modelService.modelValidation.validateNode(node);\n } catch (error) {\n node.connectors.splice(node.connectors.indexOf(connector), 1);\n throw error;\n }\n }\n\n public delete(node: FcNode) {\n if (this.isSelected(node)) {\n this.deselect(node);\n }\n const model = this.modelService.model;\n const index = model.nodes.indexOf(node);\n if (index === -1) {\n if (node === undefined) {\n throw new Error('Passed undefined');\n }\n throw new Error('Tried to delete not existing node');\n }\n const connectorIds = this.getConnectorIds(node);\n for (let i = 0; i < model.edges.length; i++) {\n const edge = model.edges[i];\n if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) {\n this.modelService.edges.delete(edge);\n i--;\n }\n }\n model.nodes.splice(index, 1);\n this.modelService.nodeRemovedCallback(node);\n }\n\n public getSelectedNodes(): Array {\n const model = this.modelService.model;\n return model.nodes.filter((node) => {\n return this.modelService.nodes.isSelected(node);\n });\n }\n\n public handleClicked(node: FcNode, ctrlKey?: boolean) {\n if (ctrlKey) {\n this.modelService.nodes.toggleSelected(node);\n } else {\n this.modelService.deselectAll();\n this.modelService.nodes.select(node);\n }\n }\n\n private _addNode(node: FcNode) {\n const model = this.modelService.model;\n try {\n model.nodes.push(node);\n this.modelService.modelValidation.validateNodes(model.nodes);\n } catch (error) {\n model.nodes.splice(model.nodes.indexOf(node), 1);\n throw error;\n }\n }\n\n public getConnectorIds(node: FcNode): Array {\n return node.connectors.map((connector) => {\n return connector.id;\n });\n }\n\n public getNodeByConnectorId(connectorId: string): FcNode {\n const model = this.modelService.model;\n for (const node of model.nodes) {\n const connectorIds = this.getConnectorIds(node);\n if (connectorIds.indexOf(connectorId) > -1) {\n return node;\n }\n }\n return null;\n }\n\n public getHtmlElement(nodeId: string): HTMLElement {\n return this.modelService.nodesHtmlElements[nodeId];\n }\n\n public setHtmlElement(nodeId: string, element: HTMLElement) {\n this.modelService.nodesHtmlElements[nodeId] = element;\n this.modelService.detectChanges();\n }\n\n}\n\nclass EdgesModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public ready(edge: FcEdge): boolean {\n const source = this.modelService.connectors.getHtmlElement(edge.source);\n const destination = this.modelService.connectors.getHtmlElement(edge.destination);\n return source !== undefined && destination !== undefined;\n }\n\n public sourceCoord(edge: FcEdge): FcCoords {\n return this.modelService.connectors.getCenteredCoord(edge.source);\n }\n\n public destCoord(edge: FcEdge): FcCoords {\n return this.modelService.connectors.getCenteredCoord(edge.destination);\n }\n\n public delete(edge: FcEdge) {\n const model = this.modelService.model;\n const index = model.edges.indexOf(edge);\n if (index === -1) {\n throw new Error('Tried to delete not existing edge');\n }\n if (this.isSelected(edge)) {\n this.deselect(edge);\n }\n model.edges.splice(index, 1);\n this.modelService.edgeRemovedCallback(edge);\n }\n\n public getSelectedEdges(): Array {\n const model = this.modelService.model;\n return model.edges.filter((edge) => {\n return this.modelService.edges.isSelected(edge);\n });\n }\n\n public handleEdgeMouseClick(edge: FcEdge, ctrlKey?: boolean) {\n if (ctrlKey) {\n this.modelService.edges.toggleSelected(edge);\n } else {\n this.modelService.deselectAll();\n this.modelService.edges.select(edge);\n }\n }\n\n public putEdge(edge: FcEdge) {\n const model = this.modelService.model;\n model.edges.push(edge);\n }\n\n public _addEdge(event: Event, sourceConnector: FcConnector, destConnector: FcConnector, label: string) {\n this.modelService.modelValidation.validateConnector(sourceConnector);\n this.modelService.modelValidation.validateConnector(destConnector);\n const edge: FcEdge = {};\n edge.source = sourceConnector.id;\n edge.destination = destConnector.id;\n edge.label = label;\n const model = this.modelService.model;\n this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes);\n this.modelService.createEdge(event, edge).subscribe(\n (created) => {\n model.edges.push(created);\n this.modelService.edgeAddedCallback(created);\n }\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { FcConnector, FcEdge, FcModel, FcNode, fcTopSort, ModelvalidationError } from './ngx-flowchart.models';\n\n@Injectable()\nexport class FcModelValidationService {\n\n constructor() { }\n\n public validateModel(model: FcModel): FcModel {\n this.validateNodes(model.nodes);\n this._validateEdges(model.edges, model.nodes);\n return model;\n }\n\n public validateNodes(nodes: Array): Array {\n const ids: string[] = [];\n nodes.forEach((node) => {\n this.validateNode(node);\n if (ids.indexOf(node.id) !== -1) {\n throw new ModelvalidationError('Id not unique.');\n }\n ids.push(node.id);\n });\n const connectorIds: string[] = [];\n nodes.forEach((node) => {\n node.connectors.forEach((connector) => {\n if (connectorIds.indexOf(connector.id) !== -1) {\n throw new ModelvalidationError('Id not unique.');\n }\n connectorIds.push(connector.id);\n });\n });\n return nodes;\n }\n\n public validateNode(node: FcNode): FcNode {\n if (node.id === undefined) {\n throw new ModelvalidationError('Id not valid.');\n }\n if (typeof node.name !== 'string') {\n throw new ModelvalidationError('Name not valid.');\n }\n if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) {\n throw new ModelvalidationError('Coordinates not valid.');\n }\n if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) {\n throw new ModelvalidationError('Coordinates not valid.');\n }\n if (!Array.isArray(node.connectors)) {\n throw new ModelvalidationError('Connectors not valid.');\n }\n node.connectors.forEach((connector) => {\n this.validateConnector(connector);\n });\n return node;\n }\n\n private _validateEdges(edges: Array, nodes: Array): Array {\n edges.forEach((edge) => {\n this._validateEdge(edge, nodes);\n });\n edges.forEach((edge1, index1) => {\n edges.forEach((edge2, index2) => {\n if (index1 !== index2) {\n if ((edge1.source === edge2.source && edge1.destination === edge2.destination) ||\n (edge1.source === edge2.destination && edge1.destination === edge2.source)) {\n throw new ModelvalidationError('Duplicated edge.');\n }\n }\n });\n });\n if (fcTopSort({nodes, edges}) === null) {\n throw new ModelvalidationError('Graph has a circle.');\n }\n return edges;\n }\n\n public validateEdges(edges: Array, nodes: Array): Array {\n this.validateNodes(nodes);\n return this._validateEdges(edges, nodes);\n }\n\n private _validateEdge(edge: FcEdge, nodes: Array): FcEdge {\n if (edge.source === undefined) {\n throw new ModelvalidationError('Source not valid.');\n }\n if (edge.destination === undefined) {\n throw new ModelvalidationError('Destination not valid.');\n }\n if (edge.source === edge.destination) {\n throw new ModelvalidationError('Edge with same source and destination connectors.');\n }\n const sourceNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.source))[0];\n if (sourceNode === undefined) {\n throw new ModelvalidationError('Source not valid.');\n }\n const destinationNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.destination))[0];\n if (destinationNode === undefined) {\n throw new ModelvalidationError('Destination not valid.');\n }\n if (sourceNode === destinationNode) {\n throw new ModelvalidationError('Edge with same source and destination nodes.');\n }\n return edge;\n }\n\n public validateEdge(edge: FcEdge, nodes: Array): FcEdge {\n this.validateNodes(nodes);\n return this._validateEdge(edge, nodes);\n }\n\n public validateConnector(connector: FcConnector): FcConnector {\n if (connector.id === undefined) {\n throw new ModelvalidationError('Id not valid.');\n }\n if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') {\n throw new ModelvalidationError('Type not valid.');\n }\n return connector;\n }\n\n}\n","import { FcModelService } from './model.service';\nimport { FcCoords, FcNode, FlowchartConstants } from './ngx-flowchart.models';\n\nconst nodeDropScope: NodeDropScope = {\n dropElement: null\n};\n\nexport class FcNodeDraggingService {\n\n nodeDraggingScope: NodeDraggingScope = {\n shadowDragStarted: false,\n dropElement: null,\n draggedNodes: [],\n shadowElements: []\n };\n\n private dragOffsets: FcCoords[] = [];\n private draggedElements: HTMLElement[] = [];\n\n private destinationHtmlElements: HTMLElement[] = [];\n private oldDisplayStyles: string[] = [];\n\n private readonly modelService: FcModelService;\n private readonly automaticResize: boolean;\n private readonly dragAnimation: string;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(modelService: FcModelService,\n applyFunction: (fn: (...args: any[]) => T) => T,\n automaticResize: boolean, dragAnimation: string) {\n this.modelService = modelService;\n this.automaticResize = automaticResize;\n this.dragAnimation = dragAnimation;\n this.applyFunction = applyFunction;\n }\n\n private getCoordinate(coordinate: number, max: number): number {\n coordinate = Math.max(coordinate, 0);\n coordinate = Math.min(coordinate, max);\n return coordinate;\n }\n\n private getXCoordinate(x: number): number {\n return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth);\n }\n\n private getYCoordinate(y: number): number {\n return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight);\n }\n\n private resizeCanvas(draggedNode: FcNode, nodeElement: HTMLElement) {\n if (this.automaticResize && !this.modelService.isDropSource()) {\n const canvasElement = this.modelService.canvasHtmlElement;\n if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) {\n canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px';\n }\n if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) {\n canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px';\n }\n }\n }\n\n public isDraggingNode(node: FcNode): boolean {\n return this.nodeDraggingScope.draggedNodes.includes(node);\n }\n\n public dragstart(event: DragEvent, node: FcNode) {\n if (node.readonly) {\n return;\n }\n this.dragOffsets.length = 0;\n this.draggedElements.length = 0;\n this.nodeDraggingScope.draggedNodes.length = 0;\n this.nodeDraggingScope.shadowElements.length = 0;\n this.destinationHtmlElements.length = 0;\n this.oldDisplayStyles.length = 0;\n const elements: Array> = [];\n const nodes: Array = [];\n if (this.modelService.nodes.isSelected(node)) {\n const selectedNodes = this.modelService.nodes.getSelectedNodes();\n for (const selectedNode of selectedNodes) {\n const element = $(this.modelService.nodes.getHtmlElement(selectedNode.id));\n elements.push(element);\n nodes.push(selectedNode);\n }\n } else {\n elements.push($(event.target as HTMLElement));\n nodes.push(node);\n }\n const offsetsX: number[] = [];\n const offsetsY: number[] = [];\n for (const element of elements) {\n offsetsX.push(parseInt(element.css('left'), 10) - event.clientX);\n offsetsY.push(parseInt(element.css('top'), 10) - event.clientY);\n }\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n if (this.modelService.isDropSource()) {\n if (nodeDropScope.dropElement) {\n nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement);\n nodeDropScope.dropElement = null;\n }\n nodeDropScope.dropElement = elements[0][0].cloneNode(true) as NodeDropElement;\n const offset = $(this.modelService.canvasHtmlElement).offset();\n nodeDropScope.dropElement.offsetInfo = {\n offsetX: Math.round(offsetsX[0] + offset.left),\n offsetY: Math.round(offsetsY[0] + offset.top)\n };\n nodeDropScope.dropElement.style.position = 'absolute';\n nodeDropScope.dropElement.style.pointerEvents = 'none';\n nodeDropScope.dropElement.style.zIndex = '9999';\n\n document.body.appendChild(nodeDropScope.dropElement);\n const dropNodeInfo: DropNodeInfo = {\n node,\n dropTargetId: this.modelService.dropTargetId,\n offsetX: Math.round(offsetsX[0] + offset.left),\n offsetY: Math.round(offsetsY[0] + offset.top)\n };\n originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo));\n\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n const target: HTMLElement = event.target as HTMLElement;\n this.destinationHtmlElements.push(target);\n this.oldDisplayStyles.push(target.style.display);\n target.style.display = 'none';\n this.nodeDraggingScope.shadowDragStarted = true;\n }\n return;\n }\n this.nodeDraggingScope.draggedNodes = nodes;\n for (let i = 0; i < elements.length; i++) {\n this.draggedElements.push(elements[i][0]);\n this.dragOffsets.push(\n {\n x: offsetsX[i],\n y: offsetsY[i]\n }\n );\n }\n\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n for (let i = 0; i < this.draggedElements.length; i++) {\n const dragOffset = this.dragOffsets[i];\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const shadowElement = $(`
` +\n `

${draggedNode.name}

`);\n const targetInnerNode = $(this.draggedElements[i]).children()[0];\n shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor;\n this.nodeDraggingScope.shadowElements.push(shadowElement);\n this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]);\n }\n }\n originalEvent.dataTransfer.setData('text', 'Just to support firefox');\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n for (let i = 0; i < this.draggedElements.length; i++) {\n this.destinationHtmlElements.push(this.draggedElements[i]);\n this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);\n this.destinationHtmlElements[i].style.display = 'none';\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.nodeDraggingScope.shadowDragStarted = true;\n }\n }\n }\n\n public drop(event: DragEvent): boolean {\n if (this.modelService.isDropSource()) {\n event.preventDefault();\n return false;\n }\n let dropNode: FcNode = null;\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n const infoText = originalEvent.dataTransfer.getData('text');\n if (infoText) {\n let dropNodeInfo: DropNodeInfo = null;\n try {\n dropNodeInfo = JSON.parse(infoText);\n } catch (e) {}\n if (dropNodeInfo && dropNodeInfo.dropTargetId) {\n if (this.modelService.canvasHtmlElement.id &&\n this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) {\n dropNode = dropNodeInfo.node;\n const offset = $(this.modelService.canvasHtmlElement).offset();\n const x = event.clientX - offset.left;\n const y = event.clientY - offset.top;\n dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x));\n dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y));\n }\n }\n }\n if (dropNode) {\n this.modelService.dropNode(event, dropNode);\n event.preventDefault();\n return false;\n } else if (this.nodeDraggingScope.draggedNodes.length) {\n return this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n draggedNode.x = Math.round(this.getXCoordinate(dragOffset.x + event.clientX));\n draggedNode.y = Math.round(this.getYCoordinate(dragOffset.y + event.clientY));\n }\n event.preventDefault();\n return false;\n });\n }\n }\n\n public dragover(event: DragEvent) {\n if (nodeDropScope.dropElement) {\n const offsetInfo = nodeDropScope.dropElement.offsetInfo;\n nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px';\n nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px';\n if (this.nodeDraggingScope.shadowDragStarted) {\n this.applyFunction(() => {\n this.destinationHtmlElements[0].style.display = this.oldDisplayStyles[0];\n this.nodeDraggingScope.shadowDragStarted = false;\n });\n }\n event.preventDefault();\n return;\n }\n if (this.modelService.isDropSource()) {\n event.preventDefault();\n return;\n }\n if (!this.nodeDraggingScope.draggedNodes.length) {\n event.preventDefault();\n return;\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n if (this.nodeDraggingScope.draggedNodes.length) {\n return this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n draggedNode.x = this.getXCoordinate(dragOffset.x + event.clientX);\n draggedNode.y = this.getYCoordinate(dragOffset.y + event.clientY);\n this.resizeCanvas(draggedNode, this.draggedElements[i]);\n }\n event.preventDefault();\n return false;\n });\n }\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.nodeDraggingScope.draggedNodes.length) {\n if (this.nodeDraggingScope.shadowDragStarted) {\n this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n this.destinationHtmlElements[i].style.display = this.oldDisplayStyles[i];\n }\n this.nodeDraggingScope.shadowDragStarted = false;\n });\n }\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px');\n this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px');\n this.resizeCanvas(draggedNode, this.draggedElements[i]);\n }\n event.preventDefault();\n }\n }\n }\n\n public dragend(event: DragEvent) {\n this.applyFunction(() => {\n if (nodeDropScope.dropElement) {\n nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement);\n nodeDropScope.dropElement = null;\n }\n if (this.modelService.isDropSource()) {\n return;\n }\n if (this.nodeDraggingScope.shadowElements.length) {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const shadowElement = this.nodeDraggingScope.shadowElements[i];\n draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10);\n draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10);\n this.modelService.canvasHtmlElement.removeChild(shadowElement[0]);\n }\n this.nodeDraggingScope.shadowElements.length = 0;\n }\n\n if (this.nodeDraggingScope.draggedNodes.length) {\n this.nodeDraggingScope.draggedNodes.length = 0;\n this.draggedElements.length = 0;\n this.dragOffsets.length = 0;\n }\n });\n }\n\n}\n\nexport interface NodeDraggingScope {\n draggedNodes: Array;\n shadowElements: Array>;\n shadowDragStarted: boolean;\n dropElement: HTMLElement;\n}\n\nexport interface NodeDropElement extends HTMLElement {\n offsetInfo?: {\n offsetX: number;\n offsetY: number;\n };\n}\n\nexport interface NodeDropScope {\n dropElement: NodeDropElement;\n}\n\nexport interface DropNodeInfo {\n node: FcNode;\n dropTargetId: string;\n offsetX: number;\n offsetY: number;\n}\n","import { Injectable } from '@angular/core';\nimport { FcCoords, FlowchartConstants } from './ngx-flowchart.models';\n\n@Injectable()\nexport class FcEdgeDrawingService {\n\n constructor() {\n }\n\n public getEdgeDAttribute(pt1: FcCoords, pt2: FcCoords, style: string): string {\n let dAddribute = `M ${pt1.x}, ${pt1.y} `;\n if (style === FlowchartConstants.curvedStyle) {\n const sourceTangent = this.computeEdgeSourceTangent(pt1, pt2);\n const destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2);\n dAddribute += `C ${sourceTangent.x}, ${sourceTangent.y} ${(destinationTangent.x - 50)}, ${destinationTangent.y} ${pt2.x}, ${pt2.y}`;\n } else {\n dAddribute += `L ${pt2.x}, ${pt2.y}`;\n }\n return dAddribute;\n }\n\n public getEdgeCenter(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: (pt1.x + pt2.x) / 2,\n y: (pt1.y + pt2.y) / 2\n };\n }\n\n private computeEdgeTangentOffset(pt1: FcCoords, pt2: FcCoords): number {\n return (pt2.y - pt1.y) / 2;\n }\n\n private computeEdgeSourceTangent(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: pt1.x,\n y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2)\n };\n }\n\n private computeEdgeDestinationTangent(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: pt2.x,\n y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2)\n };\n }\n\n}\n","import { FcModelService } from './model.service';\nimport { FcConnector, FcCoords, FcEdge, FcModel, FlowchartConstants, ModelvalidationError } from './ngx-flowchart.models';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { FcModelValidationService } from './modelvalidation.service';\n\nexport class FcEdgeDraggingService {\n\n edgeDragging: EdgeDragging = {\n isDragging: false,\n dragPoint1: null,\n dragPoint2: null,\n shadowDragStarted: false\n };\n\n private draggedEdgeSource: FcConnector = null;\n private dragOffset: FcCoords = {};\n private destinationHtmlElement: HTMLElement = null;\n private oldDisplayStyle = '';\n\n private readonly modelValidation: FcModelValidationService;\n private readonly edgeDrawingService: FcEdgeDrawingService;\n private readonly modelService: FcModelService;\n private readonly model: FcModel;\n private readonly isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n private readonly dragAnimation: string;\n private readonly edgeStyle: string;\n\n constructor(modelValidation: FcModelValidationService,\n edgeDrawingService: FcEdgeDrawingService,\n modelService: FcModelService,\n model: FcModel,\n isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean,\n applyFunction: (fn: (...args: any[]) => T) => T,\n dragAnimation: string,\n edgeStyle: string) {\n this.modelValidation = modelValidation;\n this.edgeDrawingService = edgeDrawingService;\n this.modelService = modelService;\n this.model = model;\n this.isValidEdgeCallback = isValidEdgeCallback || (() => true);\n this.applyFunction = applyFunction;\n this.dragAnimation = dragAnimation;\n this.edgeStyle = edgeStyle;\n }\n\n public dragstart(event: DragEvent, connector: FcConnector) {\n let swapConnector: FcConnector;\n let dragLabel: string;\n let prevEdge: FcEdge;\n if (connector.type === FlowchartConstants.leftConnectorType) {\n for (const edge of this.model.edges) {\n if (edge === connector.id) {\n swapConnector = this.modelService.connectors.getConnector(edge.source);\n dragLabel = edge.label;\n prevEdge = edge;\n this.applyFunction(() => {\n this.modelService.edges.delete(edge);\n });\n break;\n }\n }\n }\n this.edgeDragging.isDragging = true;\n if (swapConnector !== undefined) {\n this.draggedEdgeSource = swapConnector;\n this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id);\n this.edgeDragging.dragLabel = dragLabel;\n this.edgeDragging.prevEdge = prevEdge;\n } else {\n this.draggedEdgeSource = connector;\n this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id);\n }\n const canvas = this.modelService.canvasHtmlElement;\n if (!canvas) {\n throw new Error('No canvas while edgedraggingService found.');\n }\n this.dragOffset.x = -canvas.getBoundingClientRect().left;\n this.dragOffset.y = -canvas.getBoundingClientRect().top;\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n\n originalEvent.dataTransfer.setData('Text', 'Just to support firefox');\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n this.destinationHtmlElement = event.target as HTMLElement;\n this.oldDisplayStyle = this.destinationHtmlElement.style.display;\n this.destinationHtmlElement.style.display = 'none';\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.edgeDragging.shadowDragStarted = true;\n }\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.edgeDragging.gElement === undefined) {\n this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class'));\n this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path');\n this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle');\n }\n\n this.edgeDragging.gElement.css('display', 'block');\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n }\n event.stopPropagation();\n }\n\n public dragover(event: DragEvent) {\n if (this.edgeDragging.isDragging) {\n if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.destinationHtmlElement !== null) {\n this.destinationHtmlElement.style.display = this.oldDisplayStyle;\n }\n\n if (this.edgeDragging.shadowDragStarted) {\n this.applyFunction(() => {\n this.edgeDragging.shadowDragStarted = false;\n });\n }\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n return this.applyFunction(() => {\n if (this.destinationHtmlElement !== null) {\n this.destinationHtmlElement.style.display = this.oldDisplayStyle;\n }\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n });\n }\n }\n }\n\n public dragoverConnector(event: DragEvent, connector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n this.dragover(event);\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: connector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n }\n }\n\n public dragleaveMagnet(event: DragEvent) {\n this.edgeDragging.magnetActive = false;\n }\n\n public dragoverMagnet(event: DragEvent, connector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n this.dragover(event);\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: connector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) {\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n\n this.edgeDragging.magnetActive = true;\n\n this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id);\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n\n event.preventDefault();\n event.stopPropagation();\n return false;\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n return this.applyFunction(() => {\n this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id);\n event.preventDefault();\n event.stopPropagation();\n return false;\n });\n }\n }\n }\n }\n\n public dragend(event: DragEvent) {\n if (this.edgeDragging.isDragging) {\n this.edgeDragging.isDragging = false;\n this.edgeDragging.dragPoint1 = null;\n this.edgeDragging.dragPoint2 = null;\n this.edgeDragging.dragLabel = null;\n event.stopPropagation();\n\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.edgeDragging.gElement.css('display', 'none');\n }\n if (this.edgeDragging.prevEdge) {\n const edge = this.edgeDragging.prevEdge;\n this.edgeDragging.prevEdge = null;\n this.applyFunction(() => {\n this.modelService.edges.putEdge(edge);\n });\n }\n }\n }\n\n public drop(event: DragEvent, targetConnector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: targetConnector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n\n if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) {\n this.edgeDragging.prevEdge = null;\n this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel);\n event.stopPropagation();\n event.preventDefault();\n return false;\n }\n }\n }\n}\n\nexport interface EdgeDragging {\n isDragging: boolean;\n shadowDragStarted: boolean;\n dragPoint1: FcCoords;\n dragPoint2: FcCoords;\n dragLabel?: string;\n prevEdge?: FcEdge;\n magnetActive?: boolean;\n gElement?: JQuery;\n pathElement?: JQuery;\n circleElement?: JQuery;\n}\n","import { FcConnector, FcEdge, FcNode } from './ngx-flowchart.models';\n\nexport class FcMouseOverService {\n\n mouseoverscope: MouseOverScope = {\n connector: null,\n edge: null,\n node: null\n };\n\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(applyFunction: (fn: (...args: any[]) => T) => T) {\n this.applyFunction = applyFunction;\n }\n\n public nodeMouseOver(event: MouseEvent, node: FcNode) {\n return this.applyFunction(() => {\n this.mouseoverscope.node = node;\n });\n }\n\n public nodeMouseOut(event: MouseEvent, node: FcNode) {\n return this.applyFunction(() => {\n this.mouseoverscope.node = null;\n });\n }\n\n public connectorMouseEnter(event: MouseEvent, connector: FcConnector) {\n return this.applyFunction(() => {\n this.mouseoverscope.connector = connector;\n });\n }\n\n public connectorMouseLeave(event: MouseEvent, connector: FcConnector) {\n return this.applyFunction(() => {\n this.mouseoverscope.connector = null;\n });\n }\n\n public edgeMouseEnter(event: MouseEvent, edge: FcEdge) {\n this.mouseoverscope.edge = edge;\n }\n\n public edgeMouseLeave(event: MouseEvent, edge: FcEdge) {\n this.mouseoverscope.edge = null;\n }\n}\n\nexport interface MouseOverScope {\n connector: FcConnector;\n edge: FcEdge;\n node: FcNode;\n}\n","const regex = /(auto|scroll)/;\n\nconst style = (node: Element, prop: string): string =>\n getComputedStyle(node, null).getPropertyValue(prop);\n\nconst scroll = (node: Element) =>\n regex.test(\n style(node, 'overflow') +\n style(node, 'overflow-y') +\n style(node, 'overflow-x'));\n\nconst scrollparent = (node: HTMLElement): HTMLElement =>\n !node || node === document.body\n ? document.body\n : scroll(node)\n ? node\n : scrollparent(node.parentNode as HTMLElement);\n\nexport default scrollparent;\n","import { FcModelService } from './model.service';\nimport { FcRectBox } from 'ngx-flowchart-dev';\nimport scrollparent from './scrollparent';\n\ninterface Rectangle {\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n}\n\nexport class FcRectangleSelectService {\n\n private readonly selectRect: Rectangle = {\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 0\n };\n\n private readonly modelService: FcModelService;\n private readonly selectElement: HTMLElement;\n private readonly $canvasElement: JQuery;\n private readonly $scrollParent: JQuery;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(modelService: FcModelService,\n selectElement: HTMLElement,\n applyFunction: (fn: (...args: any[]) => T) => T) {\n this.modelService = modelService;\n this.selectElement = selectElement;\n this.$canvasElement = $(this.modelService.canvasHtmlElement);\n this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement));\n this.applyFunction = applyFunction;\n }\n\n public mousedown(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && this.selectElement.hidden) {\n this.selectElement.hidden = false;\n const offset = this.$canvasElement.offset();\n this.selectRect.x1 = Math.round(e.pageX - offset.left);\n this.selectRect.y1 = Math.round(e.pageY - offset.top);\n this.selectRect.x2 = this.selectRect.x1;\n this.selectRect.y2 = this.selectRect.y1;\n this.updateSelectRect();\n }\n }\n\n public mousemove(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && !this.selectElement.hidden) {\n const offset = this.$canvasElement.offset();\n this.selectRect.x2 = Math.round(e.pageX - offset.left);\n this.selectRect.y2 = Math.round(e.pageY - offset.top);\n this.updateScroll(offset);\n this.updateSelectRect();\n }\n }\n\n private updateScroll(offset: JQuery.Coordinates) {\n const rect = this.$scrollParent[0].getBoundingClientRect();\n const bottom = rect.bottom - offset.top;\n const right = rect.right - offset.left;\n const top = rect.top - offset.top;\n const left = rect.left - offset.left;\n if (this.selectRect.y2 - top < 25) {\n const topScroll = 25 - (this.selectRect.y2 - top);\n const scroll = this.$scrollParent.scrollTop();\n this.$scrollParent.scrollTop(scroll - topScroll);\n } else if (bottom - this.selectRect.y2 < 40) {\n const bottomScroll = 40 - (bottom - this.selectRect.y2);\n const scroll = this.$scrollParent.scrollTop();\n this.$scrollParent.scrollTop(scroll + bottomScroll);\n }\n if (this.selectRect.x2 - left < 25) {\n const leftScroll = 25 - (this.selectRect.x2 - left);\n const scroll = this.$scrollParent.scrollLeft();\n this.$scrollParent.scrollLeft(scroll - leftScroll);\n } else if (right - this.selectRect.x2 < 40) {\n const rightScroll = 40 - (right - this.selectRect.x2);\n const scroll = this.$scrollParent.scrollLeft();\n this.$scrollParent.scrollLeft(scroll + rightScroll);\n }\n }\n\n public mouseup(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && !this.selectElement.hidden) {\n const rectBox = this.selectElement.getBoundingClientRect() as FcRectBox;\n this.selectElement.hidden = true;\n this.selectObjects(rectBox);\n }\n }\n\n private updateSelectRect() {\n const x3 = Math.min(this.selectRect.x1, this.selectRect.x2);\n const x4 = Math.max(this.selectRect.x1, this.selectRect.x2);\n const y3 = Math.min(this.selectRect.y1, this.selectRect.y2);\n const y4 = Math.max(this.selectRect.y1, this.selectRect.y2);\n this.selectElement.style.left = x3 + 'px';\n this.selectElement.style.top = y3 + 'px';\n this.selectElement.style.width = x4 - x3 + 'px';\n this.selectElement.style.height = y4 - y3 + 'px';\n }\n\n private selectObjects(rectBox: FcRectBox) {\n this.applyFunction(() => {\n this.modelService.selectAllInRect(rectBox);\n });\n }\n\n}\n\n","import {\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnInit\n} from '@angular/core';\nimport { FcCallbacks, FcEdge, FcModel, FcNode, FlowchartConstants, UserCallbacks, UserNodeCallbacks } from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\nimport { FcModelValidationService } from './modelvalidation.service';\nimport { FcNodeDraggingService } from './node-dragging.service';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { FcEdgeDraggingService } from './edge-dragging.service';\nimport { FcMouseOverService } from './mouseover.service';\nimport { FcRectangleSelectService } from './rectangleselect.service';\n\n@Component({\n selector: 'fc-canvas',\n templateUrl: './ngx-flowchart.component.html',\n styleUrls: ['./ngx-flowchart.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgxFlowchartComponent implements OnInit, DoCheck {\n\n @HostBinding('attr.class')\n get canvasClass(): string {\n return FlowchartConstants.canvasClass;\n }\n\n @Input()\n model: FcModel;\n\n @Input()\n selectedObjects: any[];\n\n @Input()\n edgeStyle: string;\n\n @Input()\n userCallbacks: UserCallbacks;\n\n @Input()\n automaticResize: boolean;\n\n @Input()\n dragAnimation: string;\n\n @Input()\n nodeWidth: number;\n\n @Input()\n nodeHeight: number;\n\n @Input()\n dropTargetId: string;\n\n callbacks: FcCallbacks;\n\n userNodeCallbacks: UserNodeCallbacks;\n\n modelService: FcModelService;\n nodeDraggingService: FcNodeDraggingService;\n edgeDraggingService: FcEdgeDraggingService;\n mouseoverService: FcMouseOverService;\n rectangleSelectService: FcRectangleSelectService;\n\n arrowDefId: string;\n arrowDefIdSelected: string;\n\n flowchartConstants = FlowchartConstants;\n\n private nodesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => {\n return item;\n });\n\n private edgesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => {\n return item;\n });\n\n constructor(private elementRef: ElementRef,\n private differs: IterableDiffers,\n private modelValidation: FcModelValidationService,\n public edgeDrawingService: FcEdgeDrawingService,\n private cd: ChangeDetectorRef,\n private zone: NgZone) {\n this.arrowDefId = 'arrow-' + Math.random();\n this.arrowDefIdSelected = this.arrowDefId + '-selected';\n }\n\n ngOnInit() {\n if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) {\n throw new Error('edgeStyle not supported.');\n }\n this.nodeHeight = this.nodeHeight || 200;\n this.nodeWidth = this.nodeWidth || 200;\n this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint;\n this.userCallbacks = this.userCallbacks || {};\n this.automaticResize = this.automaticResize || false;\n\n for (const key of Object.keys(this.userCallbacks)) {\n const callback = this.userCallbacks[key];\n if (typeof callback !== 'function' && key !== 'nodeCallbacks') {\n throw new Error('All callbacks should be functions.');\n }\n }\n\n this.userNodeCallbacks = this.userCallbacks.nodeCallbacks;\n\n const element = $(this.elementRef.nativeElement);\n\n this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects,\n this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved,\n this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg'));\n\n if (this.dropTargetId) {\n this.modelService.dropTargetId = this.dropTargetId;\n }\n\n const applyFunction = this.zone.run.bind(this.zone);\n\n this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction,\n this.automaticResize, this.dragAnimation);\n\n this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService,\n this.model, this.userCallbacks.isValidEdge || null, applyFunction,\n this.dragAnimation, this.edgeStyle);\n\n this.mouseoverService = new FcMouseOverService(applyFunction);\n\n this.rectangleSelectService = new FcRectangleSelectService(this.modelService,\n element[0].querySelector('#select-rectangle'), applyFunction);\n\n this.callbacks = {\n nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService),\n nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService),\n edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService),\n edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService),\n edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService),\n edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService),\n edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService),\n edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService),\n nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService),\n nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService),\n connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService),\n connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService),\n nodeClicked: (event, node) => {\n this.modelService.nodes.handleClicked(node, event.ctrlKey);\n event.stopPropagation();\n event.preventDefault();\n }\n };\n this.adjustCanvasSize(true);\n }\n\n ngDoCheck(): void {\n if (this.model) {\n const nodesChange = this.nodesDiffer.diff(this.model.nodes);\n const edgesChange = this.edgesDiffer.diff(this.model.edges);\n let nodesChanged = false;\n let edgesChanged = false;\n if (nodesChange !== null) {\n nodesChange.forEachAddedItem(() => {\n nodesChanged = true;\n });\n nodesChange.forEachRemovedItem(() => {\n nodesChanged = true;\n });\n }\n if (edgesChange !== null) {\n edgesChange.forEachAddedItem(() => {\n edgesChanged = true;\n });\n edgesChange.forEachRemovedItem(() => {\n edgesChanged = true;\n });\n }\n if (nodesChanged) {\n this.adjustCanvasSize(true);\n }\n if (nodesChanged || edgesChanged) {\n this.cd.detectChanges();\n }\n }\n }\n\n getEdgeDAttribute(edge: FcEdge): string {\n return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge),\n this.modelService.edges.destCoord(edge), this.edgeStyle);\n }\n\n public adjustCanvasSize(fit?: boolean) {\n let maxX = 0;\n let maxY = 0;\n const element = $(this.elementRef.nativeElement);\n this.model.nodes.forEach((node) => {\n maxX = Math.max(node.x + this.nodeWidth, maxX);\n maxY = Math.max(node.y + this.nodeHeight, maxY);\n });\n let width;\n let height;\n if (fit) {\n width = maxX;\n height = maxY;\n } else {\n width = Math.max(maxX, element.prop('offsetWidth'));\n height = Math.max(maxY, element.prop('offsetHeight'));\n }\n element.css('width', width + 'px');\n element.css('height', height + 'px');\n }\n\n canvasClick(event: MouseEvent) {}\n\n edgeMouseDown(event: MouseEvent, edge: FcEdge) {\n event.stopPropagation();\n }\n\n edgeClick(event: MouseEvent, edge: FcEdge) {\n this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey);\n event.stopPropagation();\n event.preventDefault();\n }\n\n edgeRemove(event: Event, edge: FcEdge) {\n this.modelService.edges.delete(edge);\n event.stopPropagation();\n event.preventDefault();\n }\n\n edgeEdit(event: Event, edge: FcEdge) {\n if (this.userCallbacks.edgeEdit) {\n this.userCallbacks.edgeEdit(event, edge);\n }\n }\n\n edgeDoubleClick(event: MouseEvent, edge: FcEdge) {\n if (this.userCallbacks.edgeDoubleClick) {\n this.userCallbacks.edgeDoubleClick(event, edge);\n }\n }\n\n edgeMouseOver(event: MouseEvent, edge: FcEdge) {\n if (this.userCallbacks.edgeMouseOver) {\n this.userCallbacks.edgeMouseOver(event, edge);\n }\n }\n\n edgeMouseEnter(event: MouseEvent, edge: FcEdge) {\n this.mouseoverService.edgeMouseEnter(event, edge);\n }\n\n edgeMouseLeave(event: MouseEvent, edge: FcEdge) {\n this.mouseoverService.edgeMouseLeave(event, edge);\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n this.nodeDraggingService.dragover(event);\n this.edgeDraggingService.dragover(event);\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n if (event.preventDefault) {\n event.preventDefault();\n }\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n this.nodeDraggingService.drop(event);\n }\n\n @HostListener('mousedown', ['$event'])\n mousedown(event: MouseEvent) {\n this.rectangleSelectService.mousedown(event);\n }\n\n @HostListener('mousemove', ['$event'])\n mousemove(event: MouseEvent) {\n this.rectangleSelectService.mousemove(event);\n }\n\n @HostListener('mouseup', ['$event'])\n mouseup(event: MouseEvent) {\n this.rectangleSelectService.mouseup(event);\n }\n\n}\n","import { Directive, ElementRef, HostListener, Input, OnInit } from '@angular/core';\nimport { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[fc-magnet]'\n})\nexport class FcMagnetDirective implements OnInit {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n connector: FcConnector;\n\n constructor(public elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.magnetClass);\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n return this.callbacks.edgeDragoverMagnet(event, this.connector);\n }\n\n @HostListener('dragleave', ['$event'])\n dragleave(event: DragEvent) {\n this.callbacks.edgeDragleaveMagnet(event);\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n return this.callbacks.edgeDrop(event, this.connector);\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n this.callbacks.edgeDragend(event);\n }\n\n}\n","import { Directive, ElementRef, HostListener, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[fc-connector]'\n})\nexport class FcConnectorDirective implements OnInit, OnChanges {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n connector: FcConnector;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n constructor(public elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.connectorClass);\n if (this.modelservice.isEditable()) {\n element.attr('draggable', 'true');\n this.updateConnectorClass();\n }\n this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n let updateConnector = false;\n for (const propName of Object.keys(changes)) {\n const change = changes[propName];\n if (!change.firstChange && change.currentValue !== change.previousValue) {\n if (propName === 'mouseOverConnector') {\n updateConnector = true;\n }\n }\n }\n if (updateConnector && this.modelservice.isEditable()) {\n this.updateConnectorClass();\n }\n }\n\n private updateConnectorClass() {\n const element = $(this.elementRef.nativeElement);\n if (this.connector === this.mouseOverConnector) {\n element.addClass(FlowchartConstants.hoverClass);\n } else {\n element.removeClass(FlowchartConstants.hoverClass);\n }\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n // Skip - conflict with magnet\n /* if (this.modelservice.isEditable()) {\n return this.callbacks.edgeDragoverConnector(event, this.connector);\n }*/\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n return this.callbacks.edgeDrop(event, this.connector);\n }\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.edgeDragend(event);\n }\n }\n\n @HostListener('dragstart', ['$event'])\n dragstart(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.edgeDragstart(event, this.connector);\n }\n }\n\n @HostListener('mouseenter', ['$event'])\n mouseenter(event: MouseEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.connectorMouseEnter(event, this.connector);\n }\n }\n\n @HostListener('mouseleave', ['$event'])\n mouseleave(event: MouseEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.connectorMouseLeave(event, this.connector);\n }\n }\n\n}\n","import {\n Component,\n ComponentFactoryResolver, Directive,\n ElementRef, HostBinding,\n HostListener,\n Inject,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport {\n FC_NODE_COMPONENT_CONFIG,\n FcCallbacks,\n FcConnector,\n FcNode,\n FcNodeComponentConfig,\n FlowchartConstants,\n UserNodeCallbacks\n} from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\n\n@Component({\n selector: 'fc-node',\n template: '',\n styleUrls: ['./node.component.scss']\n})\nexport class FcNodeContainerComponent implements OnInit, OnChanges {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n userNodeCallbacks: UserNodeCallbacks;\n\n @Input()\n node: FcNode;\n\n @Input()\n selected: boolean;\n\n @Input()\n edit: boolean;\n\n @Input()\n underMouse: boolean;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n dragging: boolean;\n\n @HostBinding('attr.id')\n get nodeId(): string {\n return this.node.id;\n }\n\n @HostBinding('style.top')\n get top(): string {\n return this.node.y + 'px';\n }\n\n @HostBinding('style.left')\n get left(): string {\n return this.node.x + 'px';\n }\n\n nodeComponent: FcNodeComponent;\n\n @ViewChild('nodeContent', {read: ViewContainerRef, static: true}) nodeContentContainer: ViewContainerRef;\n\n constructor(@Inject(FC_NODE_COMPONENT_CONFIG) private nodeComponentConfig: FcNodeComponentConfig,\n private elementRef: ElementRef,\n private componentFactoryResolver: ComponentFactoryResolver) {\n }\n\n ngOnInit(): void {\n if (!this.userNodeCallbacks) {\n this.userNodeCallbacks = {};\n }\n this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || (() => {});\n this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || (() => {});\n this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || (() => {});\n this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || (() => {});\n this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || (() => {});\n\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.nodeClass);\n if (!this.node.readonly) {\n element.attr('draggable', 'true');\n }\n this.updateNodeClass();\n this.modelservice.nodes.setHtmlElement(this.node.id, element[0]);\n this.nodeContentContainer.clear();\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType);\n const componentRef = this.nodeContentContainer.createComponent(componentFactory);\n this.nodeComponent = componentRef.instance;\n this.nodeComponent.callbacks = this.callbacks;\n this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks;\n this.nodeComponent.node = this.node;\n this.nodeComponent.modelservice = this.modelservice;\n this.updateNodeComponent();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n let updateNode = false;\n for (const propName of Object.keys(changes)) {\n const change = changes[propName];\n if (!change.firstChange && change.currentValue !== change.previousValue) {\n if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) {\n updateNode = true;\n }\n }\n }\n if (updateNode) {\n this.updateNodeClass();\n this.updateNodeComponent();\n }\n }\n\n private updateNodeClass() {\n const element = $(this.elementRef.nativeElement);\n this.toggleClass(element, FlowchartConstants.selectedClass, this.selected);\n this.toggleClass(element, FlowchartConstants.editClass, this.edit);\n this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse);\n this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging);\n }\n\n private updateNodeComponent() {\n this.nodeComponent.selected = this.selected;\n this.nodeComponent.edit = this.edit;\n this.nodeComponent.underMouse = this.underMouse;\n this.nodeComponent.mouseOverConnector = this.mouseOverConnector;\n this.nodeComponent.dragging = this.dragging;\n }\n\n private toggleClass(element: JQuery, clazz: string, set: boolean) {\n if (set) {\n element.addClass(clazz);\n } else {\n element.removeClass(clazz);\n }\n }\n\n @HostListener('mousedown', ['$event'])\n mousedown(event: MouseEvent) {\n event.stopPropagation();\n }\n\n @HostListener('dragstart', ['$event'])\n dragstart(event: DragEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeDragstart(event, this.node);\n }\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeDragend(event);\n }\n }\n\n @HostListener('click', ['$event'])\n click(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeClicked(event, this.node);\n }\n }\n\n @HostListener('mouseover', ['$event'])\n mouseover(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeMouseOver(event, this.node);\n }\n }\n\n @HostListener('mouseout', ['$event'])\n mouseout(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeMouseOut(event, this.node);\n }\n }\n\n}\n\nexport abstract class FcNodeComponent implements OnInit {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n userNodeCallbacks: UserNodeCallbacks;\n\n @Input()\n node: FcNode;\n\n @Input()\n selected: boolean;\n\n @Input()\n edit: boolean;\n\n @Input()\n underMouse: boolean;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n dragging: boolean;\n\n flowchartConstants = FlowchartConstants;\n\n ngOnInit(): void {\n }\n\n}\n","import { Component } from '@angular/core';\nimport { FcNodeComponent } from './node.component';\n\n@Component({\n selector: 'fc-default-node',\n templateUrl: './default-node.component.html',\n styleUrls: ['./default-node.component.scss']\n})\nexport class DefaultFcNodeComponent extends FcNodeComponent {\n\n constructor() {\n super();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { NgxFlowchartComponent } from './ngx-flowchart.component';\nimport { FcModelValidationService } from './modelvalidation.service';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { CommonModule } from '@angular/common';\nimport { FcMagnetDirective } from './magnet.directive';\nimport { FcConnectorDirective } from './connector.directive';\nimport { FcNodeContainerComponent } from './node.component';\nimport { FC_NODE_COMPONENT_CONFIG } from './ngx-flowchart.models';\nimport { DefaultFcNodeComponent } from './default-node.component';\n\n@NgModule({\n entryComponents: [\n DefaultFcNodeComponent\n ],\n declarations: [NgxFlowchartComponent,\n FcMagnetDirective,\n FcConnectorDirective,\n FcNodeContainerComponent,\n DefaultFcNodeComponent],\n providers: [\n FcModelValidationService,\n FcEdgeDrawingService,\n {\n provide: FC_NODE_COMPONENT_CONFIG,\n useValue: {\n nodeComponentType: DefaultFcNodeComponent\n }\n }\n ],\n imports: [\n CommonModule\n ],\n exports: [NgxFlowchartComponent,\n FcMagnetDirective,\n FcConnectorDirective,\n DefaultFcNodeComponent]\n})\nexport class NgxFlowchartModule { }\n"],"names":[],"mappings":";;;;;;;;AACA;AAGA,MAAa,wBAAwB,GAAG,IAAI,cAAc,CAAwB,0BAA0B,CAAC;;;;AAE7G,oCAEC;;;IADC,kDAAyC;;;MAGrC,UAAU,GAAG,IAAI;;MACjB,iBAAiB,GAAG,eAAe;;MACnC,kBAAkB,GAAG,gBAAgB;;AAE3C,MAAa,kBAAkB,GAAG;IAChC,UAAU;IACV,iBAAiB;IACjB,kBAAkB;IAClB,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,MAAM;IACjB,oBAAoB,EAAE,SAAS;IAC/B,mBAAmB,EAAE,QAAQ;IAC7B,WAAW,EAAE,UAAU,GAAG,SAAS;IACnC,aAAa,EAAE,UAAU,GAAG,WAAW;IACvC,SAAS,EAAE,UAAU,GAAG,OAAO;IAC/B,WAAW,EAAE,UAAU,GAAG,SAAS;IACnC,UAAU,EAAE,UAAU,GAAG,QAAQ;IACjC,aAAa,EAAE,UAAU,GAAG,WAAW;IACvC,SAAS,EAAE,UAAU,GAAG,OAAO;IAC/B,cAAc,EAAE,UAAU,GAAG,aAAa;IAC1C,cAAc,EAAE,UAAU,GAAG,YAAY;IACzC,WAAW,EAAE,UAAU,GAAG,SAAS;IACnC,SAAS,EAAE,UAAU,GAAG,OAAO;IAC/B,gBAAgB,EAAE,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EAAE,CAAC,qBAAqB;oBAC7B,iBAAiB;oBACjB,oBAAoB;oBACpB,sBAAsB,CAAC;aAC1B;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/ngx-flowchart/fesm5/ngx-flowchart.js b/dist/ngx-flowchart/fesm5/ngx-flowchart.js index 07e02cd..ef1f1d9 100644 --- a/dist/ngx-flowchart/fesm5/ngx-flowchart.js +++ b/dist/ngx-flowchart/fesm5/ngx-flowchart.js @@ -1,61 +1,4310 @@ -import { Injectable, ɵɵdefineInjectable, Component, NgModule } from '@angular/core'; +import { __extends, __values } from 'tslib'; +import { InjectionToken, Injectable, Component, ChangeDetectionStrategy, ElementRef, IterableDiffers, ChangeDetectorRef, NgZone, HostBinding, Input, HostListener, Directive, Inject, ComponentFactoryResolver, ViewChild, ViewContainerRef, NgModule } from '@angular/core'; +import { of } from 'rxjs'; +import { CommonModule } from '@angular/common'; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ -var NgxFlowchartService = /** @class */ (function () { - function NgxFlowchartService() { +/** @type {?} */ +var FC_NODE_COMPONENT_CONFIG = new InjectionToken('fc-node.component.config'); +/** + * @record + */ +function FcNodeComponentConfig() { } +if (false) { + /** @type {?} */ + FcNodeComponentConfig.prototype.nodeComponentType; +} +/** @type {?} */ +var htmlPrefix = 'fc'; +/** @type {?} */ +var leftConnectorType = 'leftConnector'; +/** @type {?} */ +var rightConnectorType = 'rightConnector'; +/** @type {?} */ +var FlowchartConstants = { + htmlPrefix: htmlPrefix, + leftConnectorType: leftConnectorType, + rightConnectorType: rightConnectorType, + curvedStyle: 'curved', + lineStyle: 'line', + dragAnimationRepaint: 'repaint', + dragAnimationShadow: 'shadow', + canvasClass: htmlPrefix + '-canvas', + selectedClass: htmlPrefix + '-selected', + editClass: htmlPrefix + '-edit', + activeClass: htmlPrefix + '-active', + hoverClass: htmlPrefix + '-hover', + draggingClass: htmlPrefix + '-dragging', + edgeClass: htmlPrefix + '-edge', + edgeLabelClass: htmlPrefix + '-edge-label', + connectorClass: htmlPrefix + '-connector', + magnetClass: htmlPrefix + '-magnet', + nodeClass: htmlPrefix + '-node', + nodeOverlayClass: htmlPrefix + '-node-overlay', + leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's', + rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's', + canvasResizeThreshold: 200, + canvasResizeStep: 200 +}; +/** + * @record + */ +function FcCoords() { } +if (false) { + /** @type {?|undefined} */ + FcCoords.prototype.x; + /** @type {?|undefined} */ + FcCoords.prototype.y; +} +/** + * @record + */ +function FcOffset() { } +if (false) { + /** @type {?} */ + FcOffset.prototype.top; + /** @type {?} */ + FcOffset.prototype.left; +} +/** + * @record + */ +function FcRectBox() { } +if (false) { + /** @type {?} */ + FcRectBox.prototype.top; + /** @type {?} */ + FcRectBox.prototype.left; + /** @type {?} */ + FcRectBox.prototype.right; + /** @type {?} */ + FcRectBox.prototype.bottom; +} +/** + * @record + */ +function FcConnector() { } +if (false) { + /** @type {?} */ + FcConnector.prototype.id; + /** @type {?} */ + FcConnector.prototype.type; +} +/** + * @record + */ +function FcNode() { } +if (false) { + /** @type {?} */ + FcNode.prototype.id; + /** @type {?} */ + FcNode.prototype.name; + /** @type {?} */ + FcNode.prototype.connectors; + /** @type {?|undefined} */ + FcNode.prototype.readonly; + /* Skipping unhandled member: [key: string]: any;*/ +} +/** + * @record + */ +function FcEdge() { } +if (false) { + /** @type {?|undefined} */ + FcEdge.prototype.label; + /** @type {?|undefined} */ + FcEdge.prototype.source; + /** @type {?|undefined} */ + FcEdge.prototype.destination; + /** @type {?|undefined} */ + FcEdge.prototype.active; +} +/** + * @record + */ +function FcItemInfo() { } +if (false) { + /** @type {?|undefined} */ + FcItemInfo.prototype.node; + /** @type {?|undefined} */ + FcItemInfo.prototype.edge; +} +/** + * @record + */ +function FcModel() { } +if (false) { + /** @type {?} */ + FcModel.prototype.nodes; + /** @type {?} */ + FcModel.prototype.edges; +} +/** + * @record + */ +function UserCallbacks() { } +if (false) { + /** @type {?|undefined} */ + UserCallbacks.prototype.dropNode; + /** @type {?|undefined} */ + UserCallbacks.prototype.createEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeAdded; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeRemoved; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeDoubleClick; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeMouseOver; + /** @type {?|undefined} */ + UserCallbacks.prototype.isValidEdge; + /** @type {?|undefined} */ + UserCallbacks.prototype.edgeEdit; + /** @type {?|undefined} */ + UserCallbacks.prototype.nodeCallbacks; +} +/** + * @record + */ +function UserNodeCallbacks() { } +if (false) { + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.nodeEdit; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.doubleClick; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseDown; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseEnter; + /** @type {?|undefined} */ + UserNodeCallbacks.prototype.mouseLeave; +} +/** + * @record + */ +function FcCallbacks() { } +if (false) { + /** @type {?} */ + FcCallbacks.prototype.nodeDragstart; + /** @type {?} */ + FcCallbacks.prototype.nodeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDragstart; + /** @type {?} */ + FcCallbacks.prototype.edgeDragend; + /** @type {?} */ + FcCallbacks.prototype.edgeDrop; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverConnector; + /** @type {?} */ + FcCallbacks.prototype.edgeDragoverMagnet; + /** @type {?} */ + FcCallbacks.prototype.edgeDragleaveMagnet; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOver; + /** @type {?} */ + FcCallbacks.prototype.nodeMouseOut; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseEnter; + /** @type {?} */ + FcCallbacks.prototype.connectorMouseLeave; + /** @type {?} */ + FcCallbacks.prototype.nodeClicked; +} +/** + * @record + */ +function FcAdjacentList() { } +var ModelvalidationError = /** @class */ (function (_super) { + __extends(ModelvalidationError, _super); + function ModelvalidationError(message) { + return _super.call(this, message) || this; + } + return ModelvalidationError; +}(Error)); +/** + * @param {?} graph + * @return {?} + */ +function fcTopSort(graph) { + var e_1, _a, e_2, _b; + /** @type {?} */ + var adjacentList = {}; + graph.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + adjacentList[node.id] = { incoming: 0, outgoing: [] }; + })); + graph.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var sourceNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.id === edge.source; + })); + }))[0]; + /** @type {?} */ + var destinationNode = graph.nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { + return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.id === edge.destination; + })); + }))[0]; + adjacentList[sourceNode.id].outgoing.push(destinationNode.id); + adjacentList[destinationNode.id].incoming++; + })); + /** @type {?} */ + var orderedNodes = []; + /** @type {?} */ + var sourceNodes = []; + try { + for (var _c = __values(Object.keys(adjacentList)), _d = _c.next(); !_d.done; _d = _c.next()) { + var node = _d.value; + /** @type {?} */ + var edges = adjacentList[node]; + if (edges.incoming === 0) { + sourceNodes.push(node); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_1) throw e_1.error; } + } + while (sourceNodes.length !== 0) { + /** @type {?} */ + var sourceNode = sourceNodes.pop(); + for (var i = 0; i < adjacentList[sourceNode].outgoing.length; i++) { + /** @type {?} */ + var destinationNode = adjacentList[sourceNode].outgoing[i]; + adjacentList[destinationNode].incoming--; + if (adjacentList[destinationNode].incoming === 0) { + sourceNodes.push(destinationNode); + } + adjacentList[sourceNode].outgoing.splice(i, 1); + i--; + } + orderedNodes.push(sourceNode); + } + /** @type {?} */ + var hasEdges = false; + try { + for (var _e = __values(Object.keys(adjacentList)), _f = _e.next(); !_f.done; _f = _e.next()) { + var node = _f.value; + /** @type {?} */ + var edges = adjacentList[node]; + if (edges.incoming !== 0) { + hasEdges = true; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_2) throw e_2.error; } + } + if (hasEdges) { + return null; + } + else { + return orderedNodes; + } +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var FcModelService = /** @class */ (function () { + function FcModelService(modelValidation, model, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) { + this.connectorsHtmlElements = {}; + this.nodesHtmlElements = {}; + this.canvasHtmlElement = null; + this.dragImage = null; + this.svgHtmlElement = null; + this.modelValidation = modelValidation; + this.model = model; + this.cd = cd; + this.canvasHtmlElement = canvasHtmlElement; + this.svgHtmlElement = svgHtmlElement; + this.modelValidation.validateModel(this.model); + this.selectedObjects = selectedObjects; + this.dropNode = dropNode || ((/** + * @return {?} + */ + function () { })); + this.createEdge = createEdge || ((/** + * @return {?} + */ + function () { return of({ label: 'label' }); })); + this.edgeAddedCallback = edgeAddedCallback || ((/** + * @return {?} + */ + function () { })); + this.nodeRemovedCallback = nodeRemovedCallback || ((/** + * @return {?} + */ + function () { })); + this.edgeRemovedCallback = edgeRemovedCallback || ((/** + * @return {?} + */ + function () { })); + this.connectors = new ConnectorsModel(this); + this.nodes = new NodesModel(this); + this.edges = new EdgesModel(this); + } + /** + * @return {?} + */ + FcModelService.prototype.detectChanges = /** + * @return {?} + */ + function () { + var _this = this; + setTimeout((/** + * @return {?} + */ + function () { + _this.cd.detectChanges(); + }), 0); + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.selectObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + if (this.isEditable()) { + if (this.selectedObjects.indexOf(object) === -1) { + this.selectedObjects.push(object); + } + } + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.deselectObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + if (this.isEditable()) { + /** @type {?} */ + var index = this.selectedObjects.indexOf(object); + if (index === -1) { + throw new Error('Tried to deselect an unselected object'); + } + this.selectedObjects.splice(index, 1); + } + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.toggleSelectedObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + if (this.isSelectedObject(object)) { + this.deselectObject(object); + } + else { + this.selectObject(object); + } + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.isSelectedObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.selectedObjects.indexOf(object) !== -1; + }; + /** + * @return {?} + */ + FcModelService.prototype.selectAll = /** + * @return {?} + */ + function () { + var _this = this; + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + if (!node.readonly) { + _this.nodes.select(node); + } + })); + this.model.edges.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + _this.edges.select(edge); + })); + this.detectChanges(); + }; + /** + * @return {?} + */ + FcModelService.prototype.deselectAll = /** + * @return {?} + */ + function () { + this.selectedObjects.splice(0, this.selectedObjects.length); + this.detectChanges(); + }; + /** + * @param {?} object + * @return {?} + */ + FcModelService.prototype.isEditObject = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.selectedObjects.length === 1 && + this.selectedObjects.indexOf(object) !== -1; + }; + /** + * @private + * @param {?} x + * @param {?} y + * @param {?} rectBox + * @return {?} + */ + FcModelService.prototype.inRectBox = /** + * @private + * @param {?} x + * @param {?} y + * @param {?} rectBox + * @return {?} + */ + function (x, y, rectBox) { + return x >= rectBox.left && x <= rectBox.right && + y >= rectBox.top && y <= rectBox.bottom; + }; + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + FcModelService.prototype.getItemInfoAtPoint = /** + * @param {?} x + * @param {?} y + * @return {?} + */ + function (x, y) { + return { + node: this.getNodeAtPoint(x, y), + edge: this.getEdgeAtPoint(x, y) + }; + }; + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + FcModelService.prototype.getNodeAtPoint = /** + * @param {?} x + * @param {?} y + * @return {?} + */ + function (x, y) { + var e_1, _a; + try { + for (var _b = __values(this.model.nodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + /** @type {?} */ + var element = this.nodes.getHtmlElement(node.id); + /** @type {?} */ + var nodeElementBox = element.getBoundingClientRect(); + if (x >= nodeElementBox.left && x <= nodeElementBox.right + && y >= nodeElementBox.top && y <= nodeElementBox.bottom) { + return node; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return null; + }; + /** + * @param {?} x + * @param {?} y + * @return {?} + */ + FcModelService.prototype.getEdgeAtPoint = /** + * @param {?} x + * @param {?} y + * @return {?} + */ + function (x, y) { + /** @type {?} */ + var element = document.elementFromPoint(x, y); + /** @type {?} */ + var id = element.id; + /** @type {?} */ + var edgeIndex = -1; + if (id) { + if (id.startsWith('fc-edge-path-')) { + edgeIndex = Number(id.substring('fc-edge-path-'.length)); + } + else if (id.startsWith('fc-edge-label-')) { + edgeIndex = Number(id.substring('fc-edge-label-'.length)); + } + } + if (edgeIndex > -1) { + return this.model.edges[edgeIndex]; + } + return null; + }; + /** + * @param {?} rectBox + * @return {?} + */ + FcModelService.prototype.selectAllInRect = /** + * @param {?} rectBox + * @return {?} + */ + function (rectBox) { + var _this = this; + this.model.nodes.forEach((/** + * @param {?} value + * @return {?} + */ + function (value) { + /** @type {?} */ + var element = _this.nodes.getHtmlElement(value.id); + /** @type {?} */ + var nodeElementBox = element.getBoundingClientRect(); + if (!value.readonly) { + /** @type {?} */ + var x = nodeElementBox.left + nodeElementBox.width / 2; + /** @type {?} */ + var y = nodeElementBox.top + nodeElementBox.height / 2; + if (_this.inRectBox(x, y, rectBox)) { + _this.nodes.select(value); + } + else { + if (_this.nodes.isSelected(value)) { + _this.nodes.deselect(value); + } + } + } + })); + /** @type {?} */ + var canvasElementBox = this.canvasHtmlElement.getBoundingClientRect(); + this.model.edges.forEach((/** + * @param {?} value + * @return {?} + */ + function (value) { + /** @type {?} */ + var start = _this.edges.sourceCoord(value); + /** @type {?} */ + var end = _this.edges.destCoord(value); + /** @type {?} */ + var x = (start.x + end.x) / 2 + canvasElementBox.left; + /** @type {?} */ + var y = (start.y + end.y) / 2 + canvasElementBox.top; + if (_this.inRectBox(x, y, rectBox)) { + _this.edges.select(value); + } + else { + if (_this.edges.isSelected(value)) { + _this.edges.deselect(value); + } + } + })); + }; + /** + * @return {?} + */ + FcModelService.prototype.deleteSelected = /** + * @return {?} + */ + function () { + var _this = this; + /** @type {?} */ + var edgesToDelete = this.edges.getSelectedEdges(); + edgesToDelete.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + _this.edges.delete(edge); + })); + /** @type {?} */ + var nodesToDelete = this.nodes.getSelectedNodes(); + nodesToDelete.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + _this.nodes.delete(node); + })); + }; + /** + * @return {?} + */ + FcModelService.prototype.isEditable = /** + * @return {?} + */ + function () { + return this.dropTargetId === undefined; + }; + /** + * @return {?} + */ + FcModelService.prototype.isDropSource = /** + * @return {?} + */ + function () { + return this.dropTargetId !== undefined; + }; + /** + * @return {?} + */ + FcModelService.prototype.getDragImage = /** + * @return {?} + */ + function () { + if (!this.dragImage) { + this.dragImage = new Image(); + this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + this.dragImage.style.visibility = 'hidden'; + } + return this.dragImage; + }; + /** + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @return {?} + */ + FcModelService.prototype.registerCallbacks = /** + * @param {?} edgeAddedCallback + * @param {?} nodeRemovedCallback + * @param {?} edgeRemovedCallback + * @return {?} + */ + function (edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback) { + this.edgeAddedCallback = edgeAddedCallback; + this.nodeRemovedCallback = nodeRemovedCallback; + this.edgeRemovedCallback = edgeRemovedCallback; + }; + return FcModelService; +}()); +if (false) { + /** @type {?} */ + FcModelService.prototype.modelValidation; + /** @type {?} */ + FcModelService.prototype.model; + /** @type {?} */ + FcModelService.prototype.cd; + /** @type {?} */ + FcModelService.prototype.selectedObjects; + /** @type {?} */ + FcModelService.prototype.connectorsHtmlElements; + /** @type {?} */ + FcModelService.prototype.nodesHtmlElements; + /** @type {?} */ + FcModelService.prototype.canvasHtmlElement; + /** @type {?} */ + FcModelService.prototype.dragImage; + /** @type {?} */ + FcModelService.prototype.svgHtmlElement; + /** @type {?} */ + FcModelService.prototype.dropNode; + /** @type {?} */ + FcModelService.prototype.createEdge; + /** @type {?} */ + FcModelService.prototype.edgeAddedCallback; + /** @type {?} */ + FcModelService.prototype.nodeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.edgeRemovedCallback; + /** @type {?} */ + FcModelService.prototype.dropTargetId; + /** @type {?} */ + FcModelService.prototype.connectors; + /** @type {?} */ + FcModelService.prototype.nodes; + /** @type {?} */ + FcModelService.prototype.edges; +} +/** + * @record + */ +function HtmlElementMap() { } +/** + * @abstract + * @template T + */ +var /** + * @abstract + * @template T + */ +AbstractFcModel = /** @class */ (function () { + function AbstractFcModel(modelService) { + this.modelService = modelService; + } + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.select = /** + * @param {?} object + * @return {?} + */ + function (object) { + this.modelService.selectObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.deselect = /** + * @param {?} object + * @return {?} + */ + function (object) { + this.modelService.deselectObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.toggleSelected = /** + * @param {?} object + * @return {?} + */ + function (object) { + this.modelService.toggleSelectedObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.isSelected = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.modelService.isSelectedObject(object); + }; + /** + * @param {?} object + * @return {?} + */ + AbstractFcModel.prototype.isEdit = /** + * @param {?} object + * @return {?} + */ + function (object) { + return this.modelService.isEditObject(object); + }; + return AbstractFcModel; +}()); +if (false) { + /** @type {?} */ + AbstractFcModel.prototype.modelService; +} +var ConnectorsModel = /** @class */ (function (_super) { + __extends(ConnectorsModel, _super); + function ConnectorsModel(modelService) { + return _super.call(this, modelService) || this; + } + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getConnector = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + var e_2, _a, e_3, _b; + /** @type {?} */ + var model = this.modelService.model; + try { + for (var _c = __values(model.nodes), _d = _c.next(); !_d.done; _d = _c.next()) { + var node = _d.value; + try { + for (var _e = (e_3 = void 0, __values(node.connectors)), _f = _e.next(); !_f.done; _f = _e.next()) { + var connector = _f.value; + if (connector.id === connectorId) { + return connector; + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_3) throw e_3.error; } + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_2) throw e_2.error; } + } + }; + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getHtmlElement = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + return this.modelService.connectorsHtmlElements[connectorId]; + }; + /** + * @param {?} connectorId + * @param {?} element + * @return {?} + */ + ConnectorsModel.prototype.setHtmlElement = /** + * @param {?} connectorId + * @param {?} element + * @return {?} + */ + function (connectorId, element) { + this.modelService.connectorsHtmlElements[connectorId] = element; + this.modelService.detectChanges(); + }; + /** + * @private + * @param {?} connectorId + * @param {?=} centered + * @return {?} + */ + ConnectorsModel.prototype._getCoords = /** + * @private + * @param {?} connectorId + * @param {?=} centered + * @return {?} + */ + function (connectorId, centered) { + /** @type {?} */ + var element = this.getHtmlElement(connectorId); + /** @type {?} */ + var canvas = this.modelService.canvasHtmlElement; + if (element === null || element === undefined || canvas === null) { + return { x: 0, y: 0 }; + } + /** @type {?} */ + var connectorElementBox = element.getBoundingClientRect(); + /** @type {?} */ + var canvasElementBox = canvas.getBoundingClientRect(); + /** @type {?} */ + var coords = { + x: connectorElementBox.left - canvasElementBox.left, + y: connectorElementBox.top - canvasElementBox.top + }; + if (centered) { + coords = { + x: Math.round(coords.x + element.offsetWidth / 2), + y: Math.round(coords.y + element.offsetHeight / 2) + }; + } + return coords; + }; + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getCoords = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + return this._getCoords(connectorId, false); + }; + /** + * @param {?} connectorId + * @return {?} + */ + ConnectorsModel.prototype.getCenteredCoord = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + return this._getCoords(connectorId, true); + }; + return ConnectorsModel; +}(AbstractFcModel)); +var NodesModel = /** @class */ (function (_super) { + __extends(NodesModel, _super); + function NodesModel(modelService) { + return _super.call(this, modelService) || this; + } + /** + * @param {?} node + * @param {?} type + * @return {?} + */ + NodesModel.prototype.getConnectorsByType = /** + * @param {?} node + * @param {?} type + * @return {?} + */ + function (node, type) { + return node.connectors.filter((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.type === type; + })); + }; + /** + * @private + * @param {?} node + * @param {?} connector + * @return {?} + */ + NodesModel.prototype._addConnector = /** + * @private + * @param {?} node + * @param {?} connector + * @return {?} + */ + function (node, connector) { + node.connectors.push(connector); + try { + this.modelService.modelValidation.validateNode(node); + } + catch (error) { + node.connectors.splice(node.connectors.indexOf(connector), 1); + throw error; + } + }; + /** + * @param {?} node + * @return {?} + */ + NodesModel.prototype.delete = /** + * @param {?} node + * @return {?} + */ + function (node) { + if (this.isSelected(node)) { + this.deselect(node); + } + /** @type {?} */ + var model = this.modelService.model; + /** @type {?} */ + var index = model.nodes.indexOf(node); + if (index === -1) { + if (node === undefined) { + throw new Error('Passed undefined'); + } + throw new Error('Tried to delete not existing node'); + } + /** @type {?} */ + var connectorIds = this.getConnectorIds(node); + for (var i = 0; i < model.edges.length; i++) { + /** @type {?} */ + var edge = model.edges[i]; + if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) { + this.modelService.edges.delete(edge); + i--; + } + } + model.nodes.splice(index, 1); + this.modelService.nodeRemovedCallback(node); + }; + /** + * @return {?} + */ + NodesModel.prototype.getSelectedNodes = /** + * @return {?} + */ + function () { + var _this = this; + /** @type {?} */ + var model = this.modelService.model; + return model.nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { + return _this.modelService.nodes.isSelected(node); + })); + }; + /** + * @param {?} node + * @param {?=} ctrlKey + * @return {?} + */ + NodesModel.prototype.handleClicked = /** + * @param {?} node + * @param {?=} ctrlKey + * @return {?} + */ + function (node, ctrlKey) { + if (ctrlKey) { + this.modelService.nodes.toggleSelected(node); + } + else { + this.modelService.deselectAll(); + this.modelService.nodes.select(node); + } + }; + /** + * @private + * @param {?} node + * @return {?} + */ + NodesModel.prototype._addNode = /** + * @private + * @param {?} node + * @return {?} + */ + function (node) { + /** @type {?} */ + var model = this.modelService.model; + try { + model.nodes.push(node); + this.modelService.modelValidation.validateNodes(model.nodes); + } + catch (error) { + model.nodes.splice(model.nodes.indexOf(node), 1); + throw error; + } + }; + /** + * @param {?} node + * @return {?} + */ + NodesModel.prototype.getConnectorIds = /** + * @param {?} node + * @return {?} + */ + function (node) { + return node.connectors.map((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + return connector.id; + })); + }; + /** + * @param {?} connectorId + * @return {?} + */ + NodesModel.prototype.getNodeByConnectorId = /** + * @param {?} connectorId + * @return {?} + */ + function (connectorId) { + var e_4, _a; + /** @type {?} */ + var model = this.modelService.model; + try { + for (var _b = __values(model.nodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + /** @type {?} */ + var connectorIds = this.getConnectorIds(node); + if (connectorIds.indexOf(connectorId) > -1) { + return node; + } + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_4) throw e_4.error; } + } + return null; + }; + /** + * @param {?} nodeId + * @return {?} + */ + NodesModel.prototype.getHtmlElement = /** + * @param {?} nodeId + * @return {?} + */ + function (nodeId) { + return this.modelService.nodesHtmlElements[nodeId]; + }; + /** + * @param {?} nodeId + * @param {?} element + * @return {?} + */ + NodesModel.prototype.setHtmlElement = /** + * @param {?} nodeId + * @param {?} element + * @return {?} + */ + function (nodeId, element) { + this.modelService.nodesHtmlElements[nodeId] = element; + this.modelService.detectChanges(); + }; + return NodesModel; +}(AbstractFcModel)); +var EdgesModel = /** @class */ (function (_super) { + __extends(EdgesModel, _super); + function EdgesModel(modelService) { + return _super.call(this, modelService) || this; + } + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.ready = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var source = this.modelService.connectors.getHtmlElement(edge.source); + /** @type {?} */ + var destination = this.modelService.connectors.getHtmlElement(edge.destination); + return source !== undefined && destination !== undefined; + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.sourceCoord = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + return this.modelService.connectors.getCenteredCoord(edge.source); + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.destCoord = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + return this.modelService.connectors.getCenteredCoord(edge.destination); + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.delete = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var model = this.modelService.model; + /** @type {?} */ + var index = model.edges.indexOf(edge); + if (index === -1) { + throw new Error('Tried to delete not existing edge'); + } + if (this.isSelected(edge)) { + this.deselect(edge); + } + model.edges.splice(index, 1); + this.modelService.edgeRemovedCallback(edge); + }; + /** + * @return {?} + */ + EdgesModel.prototype.getSelectedEdges = /** + * @return {?} + */ + function () { + var _this = this; + /** @type {?} */ + var model = this.modelService.model; + return model.edges.filter((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + return _this.modelService.edges.isSelected(edge); + })); + }; + /** + * @param {?} edge + * @param {?=} ctrlKey + * @return {?} + */ + EdgesModel.prototype.handleEdgeMouseClick = /** + * @param {?} edge + * @param {?=} ctrlKey + * @return {?} + */ + function (edge, ctrlKey) { + if (ctrlKey) { + this.modelService.edges.toggleSelected(edge); + } + else { + this.modelService.deselectAll(); + this.modelService.edges.select(edge); + } + }; + /** + * @param {?} edge + * @return {?} + */ + EdgesModel.prototype.putEdge = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + /** @type {?} */ + var model = this.modelService.model; + model.edges.push(edge); + }; + /** + * @param {?} event + * @param {?} sourceConnector + * @param {?} destConnector + * @param {?} label + * @return {?} + */ + EdgesModel.prototype._addEdge = /** + * @param {?} event + * @param {?} sourceConnector + * @param {?} destConnector + * @param {?} label + * @return {?} + */ + function (event, sourceConnector, destConnector, label) { + var _this = this; + this.modelService.modelValidation.validateConnector(sourceConnector); + this.modelService.modelValidation.validateConnector(destConnector); + /** @type {?} */ + var edge = {}; + edge.source = sourceConnector.id; + edge.destination = destConnector.id; + edge.label = label; + /** @type {?} */ + var model = this.modelService.model; + this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes); + this.modelService.createEdge(event, edge).subscribe((/** + * @param {?} created + * @return {?} + */ + function (created) { + model.edges.push(created); + _this.modelService.edgeAddedCallback(created); + })); + }; + return EdgesModel; +}(AbstractFcModel)); + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var FcModelValidationService = /** @class */ (function () { + function FcModelValidationService() { + } + /** + * @param {?} model + * @return {?} + */ + FcModelValidationService.prototype.validateModel = /** + * @param {?} model + * @return {?} + */ + function (model) { + this.validateNodes(model.nodes); + this._validateEdges(model.edges, model.nodes); + return model; + }; + /** + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype.validateNodes = /** + * @param {?} nodes + * @return {?} + */ + function (nodes) { + var _this = this; + /** @type {?} */ + var ids = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + _this.validateNode(node); + if (ids.indexOf(node.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + ids.push(node.id); + })); + /** @type {?} */ + var connectorIds = []; + nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + if (connectorIds.indexOf(connector.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + connectorIds.push(connector.id); + })); + })); + return nodes; + }; + /** + * @param {?} node + * @return {?} + */ + FcModelValidationService.prototype.validateNode = /** + * @param {?} node + * @return {?} + */ + function (node) { + var _this = this; + if (node.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (typeof node.name !== 'string') { + throw new ModelvalidationError('Name not valid.'); + } + if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (!Array.isArray(node.connectors)) { + throw new ModelvalidationError('Connectors not valid.'); + } + node.connectors.forEach((/** + * @param {?} connector + * @return {?} + */ + function (connector) { + _this.validateConnector(connector); + })); + return node; + }; + /** + * @private + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype._validateEdges = /** + * @private + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + function (edges, nodes) { + var _this = this; + edges.forEach((/** + * @param {?} edge + * @return {?} + */ + function (edge) { + _this._validateEdge(edge, nodes); + })); + edges.forEach((/** + * @param {?} edge1 + * @param {?} index1 + * @return {?} + */ + function (edge1, index1) { + edges.forEach((/** + * @param {?} edge2 + * @param {?} index2 + * @return {?} + */ + function (edge2, index2) { + if (index1 !== index2) { + if ((edge1.source === edge2.source && edge1.destination === edge2.destination) || + (edge1.source === edge2.destination && edge1.destination === edge2.source)) { + throw new ModelvalidationError('Duplicated edge.'); + } + } + })); + })); + if (fcTopSort({ nodes: nodes, edges: edges }) === null) { + throw new ModelvalidationError('Graph has a circle.'); + } + return edges; + }; + /** + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype.validateEdges = /** + * @param {?} edges + * @param {?} nodes + * @return {?} + */ + function (edges, nodes) { + this.validateNodes(nodes); + return this._validateEdges(edges, nodes); + }; + /** + * @private + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype._validateEdge = /** + * @private + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + function (edge, nodes) { + if (edge.source === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + if (edge.destination === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (edge.source === edge.destination) { + throw new ModelvalidationError('Edge with same source and destination connectors.'); + } + /** @type {?} */ + var sourceNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { return connector.id === edge.source; })); }))[0]; + if (sourceNode === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + /** @type {?} */ + var destinationNode = nodes.filter((/** + * @param {?} node + * @return {?} + */ + function (node) { return node.connectors.some((/** + * @param {?} connector + * @return {?} + */ + function (connector) { return connector.id === edge.destination; })); }))[0]; + if (destinationNode === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (sourceNode === destinationNode) { + throw new ModelvalidationError('Edge with same source and destination nodes.'); + } + return edge; + }; + /** + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + FcModelValidationService.prototype.validateEdge = /** + * @param {?} edge + * @param {?} nodes + * @return {?} + */ + function (edge, nodes) { + this.validateNodes(nodes); + return this._validateEdge(edge, nodes); + }; + /** + * @param {?} connector + * @return {?} + */ + FcModelValidationService.prototype.validateConnector = /** + * @param {?} connector + * @return {?} + */ + function (connector) { + if (connector.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') { + throw new ModelvalidationError('Type not valid.'); + } + return connector; + }; + FcModelValidationService.decorators = [ + { type: Injectable } + ]; + /** @nocollapse */ + FcModelValidationService.ctorParameters = function () { return []; }; + return FcModelValidationService; +}()); + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +/** @type {?} */ +var nodeDropScope = { + dropElement: null +}; +var FcNodeDraggingService = /** @class */ (function () { + function FcNodeDraggingService(modelService, applyFunction, automaticResize, dragAnimation) { + this.nodeDraggingScope = { + shadowDragStarted: false, + dropElement: null, + draggedNodes: [], + shadowElements: [] + }; + this.dragOffsets = []; + this.draggedElements = []; + this.destinationHtmlElements = []; + this.oldDisplayStyles = []; + this.modelService = modelService; + this.automaticResize = automaticResize; + this.dragAnimation = dragAnimation; + this.applyFunction = applyFunction; + } + /** + * @private + * @param {?} coordinate + * @param {?} max + * @return {?} + */ + FcNodeDraggingService.prototype.getCoordinate = /** + * @private + * @param {?} coordinate + * @param {?} max + * @return {?} + */ + function (coordinate, max) { + coordinate = Math.max(coordinate, 0); + coordinate = Math.min(coordinate, max); + return coordinate; + }; + /** + * @private + * @param {?} x + * @return {?} + */ + FcNodeDraggingService.prototype.getXCoordinate = /** + * @private + * @param {?} x + * @return {?} + */ + function (x) { + return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth); + }; + /** + * @private + * @param {?} y + * @return {?} + */ + FcNodeDraggingService.prototype.getYCoordinate = /** + * @private + * @param {?} y + * @return {?} + */ + function (y) { + return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight); + }; + /** + * @private + * @param {?} draggedNode + * @param {?} nodeElement + * @return {?} + */ + FcNodeDraggingService.prototype.resizeCanvas = /** + * @private + * @param {?} draggedNode + * @param {?} nodeElement + * @return {?} + */ + function (draggedNode, nodeElement) { + if (this.automaticResize && !this.modelService.isDropSource()) { + /** @type {?} */ + var canvasElement = this.modelService.canvasHtmlElement; + if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px'; + } + if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px'; + } + } + }; + /** + * @param {?} node + * @return {?} + */ + FcNodeDraggingService.prototype.isDraggingNode = /** + * @param {?} node + * @return {?} + */ + function (node) { + return this.nodeDraggingScope.draggedNodes.includes(node); + }; + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + FcNodeDraggingService.prototype.dragstart = /** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + var e_1, _a, e_2, _b; + if (node.readonly) { + return; + } + this.dragOffsets.length = 0; + this.draggedElements.length = 0; + this.nodeDraggingScope.draggedNodes.length = 0; + this.nodeDraggingScope.shadowElements.length = 0; + this.destinationHtmlElements.length = 0; + this.oldDisplayStyles.length = 0; + /** @type {?} */ + var elements = []; + /** @type {?} */ + var nodes = []; + if (this.modelService.nodes.isSelected(node)) { + /** @type {?} */ + var selectedNodes = this.modelService.nodes.getSelectedNodes(); + try { + for (var selectedNodes_1 = __values(selectedNodes), selectedNodes_1_1 = selectedNodes_1.next(); !selectedNodes_1_1.done; selectedNodes_1_1 = selectedNodes_1.next()) { + var selectedNode = selectedNodes_1_1.value; + /** @type {?} */ + var element = $(this.modelService.nodes.getHtmlElement(selectedNode.id)); + elements.push(element); + nodes.push(selectedNode); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (selectedNodes_1_1 && !selectedNodes_1_1.done && (_a = selectedNodes_1.return)) _a.call(selectedNodes_1); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + elements.push($((/** @type {?} */ (event.target)))); + nodes.push(node); + } + /** @type {?} */ + var offsetsX = []; + /** @type {?} */ + var offsetsY = []; + try { + for (var elements_1 = __values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) { + var element = elements_1_1.value; + offsetsX.push(parseInt(element.css('left'), 10) - event.clientX); + offsetsY.push(parseInt(element.css('top'), 10) - event.clientY); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (elements_1_1 && !elements_1_1.done && (_b = elements_1.return)) _b.call(elements_1); + } + finally { if (e_2) throw e_2.error; } + } + /** @type {?} */ + var originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + if (this.modelService.isDropSource()) { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + nodeDropScope.dropElement = (/** @type {?} */ (elements[0][0].cloneNode(true))); + /** @type {?} */ + var offset = $(this.modelService.canvasHtmlElement).offset(); + nodeDropScope.dropElement.offsetInfo = { + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + nodeDropScope.dropElement.style.position = 'absolute'; + nodeDropScope.dropElement.style.pointerEvents = 'none'; + nodeDropScope.dropElement.style.zIndex = '9999'; + document.body.appendChild(nodeDropScope.dropElement); + /** @type {?} */ + var dropNodeInfo = { + node: node, + dropTargetId: this.modelService.dropTargetId, + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo)); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + /** @type {?} */ + var target = (/** @type {?} */ (event.target)); + this.destinationHtmlElements.push(target); + this.oldDisplayStyles.push(target.style.display); + target.style.display = 'none'; + this.nodeDraggingScope.shadowDragStarted = true; + } + return; + } + this.nodeDraggingScope.draggedNodes = nodes; + for (var i = 0; i < elements.length; i++) { + this.draggedElements.push(elements[i][0]); + this.dragOffsets.push({ + x: offsetsX[i], + y: offsetsY[i] + }); + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + for (var i = 0; i < this.draggedElements.length; i++) { + /** @type {?} */ + var dragOffset = this.dragOffsets[i]; + /** @type {?} */ + var draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var shadowElement = $("
") + + ("

" + draggedNode.name + "

")); + /** @type {?} */ + var targetInnerNode = $(this.draggedElements[i]).children()[0]; + shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor; + this.nodeDraggingScope.shadowElements.push(shadowElement); + this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]); + } + } + originalEvent.dataTransfer.setData('text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + for (var i = 0; i < this.draggedElements.length; i++) { + this.destinationHtmlElements.push(this.draggedElements[i]); + this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); + this.destinationHtmlElements[i].style.display = 'none'; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.nodeDraggingScope.shadowDragStarted = true; + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeDraggingService.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (this.modelService.isDropSource()) { + event.preventDefault(); + return false; + } + /** @type {?} */ + var dropNode = null; + /** @type {?} */ + var originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + /** @type {?} */ + var infoText = originalEvent.dataTransfer.getData('text'); + if (infoText) { + /** @type {?} */ + var dropNodeInfo = null; + try { + dropNodeInfo = JSON.parse(infoText); + } + catch (e) { } + if (dropNodeInfo && dropNodeInfo.dropTargetId) { + if (this.modelService.canvasHtmlElement.id && + this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) { + dropNode = dropNodeInfo.node; + /** @type {?} */ + var offset = $(this.modelService.canvasHtmlElement).offset(); + /** @type {?} */ + var x = event.clientX - offset.left; + /** @type {?} */ + var y = event.clientY - offset.top; + dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x)); + dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y)); + } + } + } + if (dropNode) { + this.modelService.dropNode(event, dropNode); + event.preventDefault(); + return false; + } + else if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + function () { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = _this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var dragOffset = _this.dragOffsets[i]; + draggedNode.x = Math.round(_this.getXCoordinate(dragOffset.x + event.clientX)); + draggedNode.y = Math.round(_this.getYCoordinate(dragOffset.y + event.clientY)); + } + event.preventDefault(); + return false; + })); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeDraggingService.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (nodeDropScope.dropElement) { + /** @type {?} */ + var offsetInfo = nodeDropScope.dropElement.offsetInfo; + nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px'; + nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px'; + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + function () { + _this.destinationHtmlElements[0].style.display = _this.oldDisplayStyles[0]; + _this.nodeDraggingScope.shadowDragStarted = false; + })); + } + event.preventDefault(); + return; + } + if (this.modelService.isDropSource()) { + event.preventDefault(); + return; + } + if (!this.nodeDraggingScope.draggedNodes.length) { + event.preventDefault(); + return; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction((/** + * @return {?} + */ + function () { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = _this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var dragOffset = _this.dragOffsets[i]; + draggedNode.x = _this.getXCoordinate(dragOffset.x + event.clientX); + draggedNode.y = _this.getYCoordinate(dragOffset.y + event.clientY); + _this.resizeCanvas(draggedNode, _this.draggedElements[i]); + } + event.preventDefault(); + return false; + })); + } + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.nodeDraggingScope.draggedNodes.length) { + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + function () { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + _this.destinationHtmlElements[i].style.display = _this.oldDisplayStyles[i]; + } + _this.nodeDraggingScope.shadowDragStarted = false; + })); + } + for (var i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var dragOffset = this.dragOffsets[i]; + this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px'); + this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px'); + this.resizeCanvas(draggedNode, this.draggedElements[i]); + } + event.preventDefault(); + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeDraggingService.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + this.applyFunction((/** + * @return {?} + */ + function () { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + if (_this.modelService.isDropSource()) { + return; + } + if (_this.nodeDraggingScope.shadowElements.length) { + for (var i = 0; i < _this.nodeDraggingScope.draggedNodes.length; i++) { + /** @type {?} */ + var draggedNode = _this.nodeDraggingScope.draggedNodes[i]; + /** @type {?} */ + var shadowElement = _this.nodeDraggingScope.shadowElements[i]; + draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10); + draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10); + _this.modelService.canvasHtmlElement.removeChild(shadowElement[0]); + } + _this.nodeDraggingScope.shadowElements.length = 0; + } + if (_this.nodeDraggingScope.draggedNodes.length) { + _this.nodeDraggingScope.draggedNodes.length = 0; + _this.draggedElements.length = 0; + _this.dragOffsets.length = 0; + } + })); + }; + return FcNodeDraggingService; +}()); +if (false) { + /** @type {?} */ + FcNodeDraggingService.prototype.nodeDraggingScope; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragOffsets; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.draggedElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.destinationHtmlElements; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.oldDisplayStyles; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.automaticResize; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcNodeDraggingService.prototype.applyFunction; +} +/** + * @record + */ +function NodeDraggingScope() { } +if (false) { + /** @type {?} */ + NodeDraggingScope.prototype.draggedNodes; + /** @type {?} */ + NodeDraggingScope.prototype.shadowElements; + /** @type {?} */ + NodeDraggingScope.prototype.shadowDragStarted; + /** @type {?} */ + NodeDraggingScope.prototype.dropElement; +} +/** + * @record + */ +function NodeDropElement() { } +if (false) { + /** @type {?|undefined} */ + NodeDropElement.prototype.offsetInfo; +} +/** + * @record + */ +function NodeDropScope() { } +if (false) { + /** @type {?} */ + NodeDropScope.prototype.dropElement; +} +/** + * @record + */ +function DropNodeInfo() { } +if (false) { + /** @type {?} */ + DropNodeInfo.prototype.node; + /** @type {?} */ + DropNodeInfo.prototype.dropTargetId; + /** @type {?} */ + DropNodeInfo.prototype.offsetX; + /** @type {?} */ + DropNodeInfo.prototype.offsetY; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var FcEdgeDrawingService = /** @class */ (function () { + function FcEdgeDrawingService() { + } + /** + * @param {?} pt1 + * @param {?} pt2 + * @param {?} style + * @return {?} + */ + FcEdgeDrawingService.prototype.getEdgeDAttribute = /** + * @param {?} pt1 + * @param {?} pt2 + * @param {?} style + * @return {?} + */ + function (pt1, pt2, style) { + /** @type {?} */ + var dAddribute = "M " + pt1.x + ", " + pt1.y + " "; + if (style === FlowchartConstants.curvedStyle) { + /** @type {?} */ + var sourceTangent = this.computeEdgeSourceTangent(pt1, pt2); + /** @type {?} */ + var destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2); + dAddribute += "C " + sourceTangent.x + ", " + sourceTangent.y + " " + (destinationTangent.x - 50) + ", " + destinationTangent.y + " " + pt2.x + ", " + pt2.y; + } + else { + dAddribute += "L " + pt2.x + ", " + pt2.y; + } + return dAddribute; + }; + /** + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.getEdgeCenter = /** + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return { + x: (pt1.x + pt2.x) / 2, + y: (pt1.y + pt2.y) / 2 + }; + }; + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.computeEdgeTangentOffset = /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return (pt2.y - pt1.y) / 2; + }; + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.computeEdgeSourceTangent = /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return { + x: pt1.x, + y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2) + }; + }; + /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + FcEdgeDrawingService.prototype.computeEdgeDestinationTangent = /** + * @private + * @param {?} pt1 + * @param {?} pt2 + * @return {?} + */ + function (pt1, pt2) { + return { + x: pt2.x, + y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2) + }; + }; + FcEdgeDrawingService.decorators = [ + { type: Injectable } + ]; + /** @nocollapse */ + FcEdgeDrawingService.ctorParameters = function () { return []; }; + return FcEdgeDrawingService; +}()); + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var FcEdgeDraggingService = /** @class */ (function () { + function FcEdgeDraggingService(modelValidation, edgeDrawingService, modelService, model, isValidEdgeCallback, applyFunction, dragAnimation, edgeStyle) { + this.edgeDragging = { + isDragging: false, + dragPoint1: null, + dragPoint2: null, + shadowDragStarted: false + }; + this.draggedEdgeSource = null; + this.dragOffset = {}; + this.destinationHtmlElement = null; + this.oldDisplayStyle = ''; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.modelService = modelService; + this.model = model; + this.isValidEdgeCallback = isValidEdgeCallback || ((/** + * @return {?} + */ + function () { return true; })); + this.applyFunction = applyFunction; + this.dragAnimation = dragAnimation; + this.edgeStyle = edgeStyle; + } + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcEdgeDraggingService.prototype.dragstart = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var e_1, _a; + var _this = this; + /** @type {?} */ + var swapConnector; + /** @type {?} */ + var dragLabel; + /** @type {?} */ + var prevEdge; + if (connector.type === FlowchartConstants.leftConnectorType) { + var _loop_1 = function (edge) { + if (edge === connector.id) { + swapConnector = this_1.modelService.connectors.getConnector(edge.source); + dragLabel = edge.label; + prevEdge = edge; + this_1.applyFunction((/** + * @return {?} + */ + function () { + _this.modelService.edges.delete(edge); + })); + return "break"; + } + }; + var this_1 = this; + try { + for (var _b = __values(this.model.edges), _c = _b.next(); !_c.done; _c = _b.next()) { + var edge = _c.value; + var state_1 = _loop_1(edge); + if (state_1 === "break") + break; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + this.edgeDragging.isDragging = true; + if (swapConnector !== undefined) { + this.draggedEdgeSource = swapConnector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id); + this.edgeDragging.dragLabel = dragLabel; + this.edgeDragging.prevEdge = prevEdge; + } + else { + this.draggedEdgeSource = connector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id); + } + /** @type {?} */ + var canvas = this.modelService.canvasHtmlElement; + if (!canvas) { + throw new Error('No canvas while edgedraggingService found.'); + } + this.dragOffset.x = -canvas.getBoundingClientRect().left; + this.dragOffset.y = -canvas.getBoundingClientRect().top; + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + /** @type {?} */ + var originalEvent = ((/** @type {?} */ (event))).originalEvent || event; + originalEvent.dataTransfer.setData('Text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } + else { + this.destinationHtmlElement = (/** @type {?} */ (event.target)); + this.oldDisplayStyle = this.destinationHtmlElement.style.display; + this.destinationHtmlElement.style.display = 'none'; + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.shadowDragStarted = true; + } + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.edgeDragging.gElement === undefined) { + this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class')); + this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path'); + this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle'); + } + this.edgeDragging.gElement.css('display', 'block'); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + event.stopPropagation(); + }; + /** + * @param {?} event + * @return {?} + */ + FcEdgeDraggingService.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (this.edgeDragging.isDragging) { + if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.destinationHtmlElement !== null) { + this.destinationHtmlElement.style.display = this.oldDisplayStyle; + } + if (this.edgeDragging.shadowDragStarted) { + this.applyFunction((/** + * @return {?} + */ + function () { + _this.edgeDragging.shadowDragStarted = false; + })); + } + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + function () { + if (_this.destinationHtmlElement !== null) { + _this.destinationHtmlElement.style.display = _this.oldDisplayStyle; + } + _this.edgeDragging.dragPoint2 = { + x: event.clientX + _this.dragOffset.x, + y: event.clientY + _this.dragOffset.y + }; + })); + } + } + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcEdgeDraggingService.prototype.dragoverConnector = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + event.preventDefault(); + event.stopPropagation(); + return false; + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcEdgeDraggingService.prototype.dragleaveMagnet = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.edgeDragging.magnetActive = false; + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcEdgeDraggingService.prototype.dragoverMagnet = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var _this = this; + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.magnetActive = true; + this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id); + this.edgeDragging.pathElement.attr('d', this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + event.preventDefault(); + event.stopPropagation(); + return false; + } + else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.edgeDragging.dragPoint2 = _this.modelService.connectors.getCenteredCoord(connector.id); + event.preventDefault(); + event.stopPropagation(); + return false; + })); + } + } + } + }; + /** + * @param {?} event + * @return {?} + */ + FcEdgeDraggingService.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + var _this = this; + if (this.edgeDragging.isDragging) { + this.edgeDragging.isDragging = false; + this.edgeDragging.dragPoint1 = null; + this.edgeDragging.dragPoint2 = null; + this.edgeDragging.dragLabel = null; + event.stopPropagation(); + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.gElement.css('display', 'none'); + } + if (this.edgeDragging.prevEdge) { + /** @type {?} */ + var edge_1 = this.edgeDragging.prevEdge; + this.edgeDragging.prevEdge = null; + this.applyFunction((/** + * @return {?} + */ + function () { + _this.modelService.edges.putEdge(edge_1); + })); + } + } + }; + /** + * @param {?} event + * @param {?} targetConnector + * @return {?} + */ + FcEdgeDraggingService.prototype.drop = /** + * @param {?} event + * @param {?} targetConnector + * @return {?} + */ + function (event, targetConnector) { + if (this.edgeDragging.isDragging) { + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: targetConnector.id + }]), this.model.nodes); + } + catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } + else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) { + this.edgeDragging.prevEdge = null; + this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel); + event.stopPropagation(); + event.preventDefault(); + return false; + } + } + }; + return FcEdgeDraggingService; +}()); +if (false) { + /** @type {?} */ + FcEdgeDraggingService.prototype.edgeDragging; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.draggedEdgeSource; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragOffset; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.destinationHtmlElement; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.oldDisplayStyle; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelValidation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.model; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.isValidEdgeCallback; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.applyFunction; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.dragAnimation; + /** + * @type {?} + * @private + */ + FcEdgeDraggingService.prototype.edgeStyle; +} +/** + * @record + */ +function EdgeDragging() { } +if (false) { + /** @type {?} */ + EdgeDragging.prototype.isDragging; + /** @type {?} */ + EdgeDragging.prototype.shadowDragStarted; + /** @type {?} */ + EdgeDragging.prototype.dragPoint1; + /** @type {?} */ + EdgeDragging.prototype.dragPoint2; + /** @type {?|undefined} */ + EdgeDragging.prototype.dragLabel; + /** @type {?|undefined} */ + EdgeDragging.prototype.prevEdge; + /** @type {?|undefined} */ + EdgeDragging.prototype.magnetActive; + /** @type {?|undefined} */ + EdgeDragging.prototype.gElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.pathElement; + /** @type {?|undefined} */ + EdgeDragging.prototype.circleElement; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var FcMouseOverService = /** @class */ (function () { + function FcMouseOverService(applyFunction) { + this.mouseoverscope = { + connector: null, + edge: null, + node: null + }; + this.applyFunction = applyFunction; + } + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + FcMouseOverService.prototype.nodeMouseOver = /** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.node = node; + })); + }; + /** + * @param {?} event + * @param {?} node + * @return {?} + */ + FcMouseOverService.prototype.nodeMouseOut = /** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.node = null; + })); + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcMouseOverService.prototype.connectorMouseEnter = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.connector = connector; + })); + }; + /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + FcMouseOverService.prototype.connectorMouseLeave = /** + * @param {?} event + * @param {?} connector + * @return {?} + */ + function (event, connector) { + var _this = this; + return this.applyFunction((/** + * @return {?} + */ + function () { + _this.mouseoverscope.connector = null; + })); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + FcMouseOverService.prototype.edgeMouseEnter = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverscope.edge = edge; + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + FcMouseOverService.prototype.edgeMouseLeave = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverscope.edge = null; + }; + return FcMouseOverService; +}()); +if (false) { + /** @type {?} */ + FcMouseOverService.prototype.mouseoverscope; + /** + * @type {?} + * @private + */ + FcMouseOverService.prototype.applyFunction; +} +/** + * @record + */ +function MouseOverScope() { } +if (false) { + /** @type {?} */ + MouseOverScope.prototype.connector; + /** @type {?} */ + MouseOverScope.prototype.edge; + /** @type {?} */ + MouseOverScope.prototype.node; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +/** @type {?} */ +var regex = /(auto|scroll)/; +/** @type {?} */ +var style = (/** + * @param {?} node + * @param {?} prop + * @return {?} + */ +function (node, prop) { + return getComputedStyle(node, null).getPropertyValue(prop); +}); +var ɵ0 = style; +/** @type {?} */ +var scroll = (/** + * @param {?} node + * @return {?} + */ +function (node) { + return regex.test(style(node, 'overflow') + + style(node, 'overflow-y') + + style(node, 'overflow-x')); +}); +var ɵ1 = scroll; +/** @type {?} */ +var scrollparent = (/** + * @param {?} node + * @return {?} + */ +function (node) { + return !node || node === document.body + ? document.body + : scroll(node) + ? node + : scrollparent((/** @type {?} */ (node.parentNode))); +}); +var ɵ2 = scrollparent; + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +/** + * @record + */ +function Rectangle() { } +if (false) { + /** @type {?} */ + Rectangle.prototype.x1; + /** @type {?} */ + Rectangle.prototype.x2; + /** @type {?} */ + Rectangle.prototype.y1; + /** @type {?} */ + Rectangle.prototype.y2; +} +var FcRectangleSelectService = /** @class */ (function () { + function FcRectangleSelectService(modelService, selectElement, applyFunction) { + this.selectRect = { + x1: 0, + x2: 0, + y1: 0, + y2: 0 + }; + this.modelService = modelService; + this.selectElement = selectElement; + this.$canvasElement = $(this.modelService.canvasHtmlElement); + this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement)); + this.applyFunction = applyFunction; + } + /** + * @param {?} e + * @return {?} + */ + FcRectangleSelectService.prototype.mousedown = /** + * @param {?} e + * @return {?} + */ + function (e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && this.selectElement.hidden) { + this.selectElement.hidden = false; + /** @type {?} */ + var offset = this.$canvasElement.offset(); + this.selectRect.x1 = Math.round(e.pageX - offset.left); + this.selectRect.y1 = Math.round(e.pageY - offset.top); + this.selectRect.x2 = this.selectRect.x1; + this.selectRect.y2 = this.selectRect.y1; + this.updateSelectRect(); + } + }; + /** + * @param {?} e + * @return {?} + */ + FcRectangleSelectService.prototype.mousemove = /** + * @param {?} e + * @return {?} + */ + function (e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + var offset = this.$canvasElement.offset(); + this.selectRect.x2 = Math.round(e.pageX - offset.left); + this.selectRect.y2 = Math.round(e.pageY - offset.top); + this.updateScroll(offset); + this.updateSelectRect(); + } + }; + /** + * @private + * @param {?} offset + * @return {?} + */ + FcRectangleSelectService.prototype.updateScroll = /** + * @private + * @param {?} offset + * @return {?} + */ + function (offset) { + /** @type {?} */ + var rect = this.$scrollParent[0].getBoundingClientRect(); + /** @type {?} */ + var bottom = rect.bottom - offset.top; + /** @type {?} */ + var right = rect.right - offset.left; + /** @type {?} */ + var top = rect.top - offset.top; + /** @type {?} */ + var left = rect.left - offset.left; + if (this.selectRect.y2 - top < 25) { + /** @type {?} */ + var topScroll = 25 - (this.selectRect.y2 - top); + /** @type {?} */ + var scroll_1 = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll_1 - topScroll); + } + else if (bottom - this.selectRect.y2 < 40) { + /** @type {?} */ + var bottomScroll = 40 - (bottom - this.selectRect.y2); + /** @type {?} */ + var scroll_2 = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll_2 + bottomScroll); + } + if (this.selectRect.x2 - left < 25) { + /** @type {?} */ + var leftScroll = 25 - (this.selectRect.x2 - left); + /** @type {?} */ + var scroll_3 = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll_3 - leftScroll); + } + else if (right - this.selectRect.x2 < 40) { + /** @type {?} */ + var rightScroll = 40 - (right - this.selectRect.x2); + /** @type {?} */ + var scroll_4 = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll_4 + rightScroll); + } + }; + /** + * @param {?} e + * @return {?} + */ + FcRectangleSelectService.prototype.mouseup = /** + * @param {?} e + * @return {?} + */ + function (e) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + /** @type {?} */ + var rectBox = (/** @type {?} */ (this.selectElement.getBoundingClientRect())); + this.selectElement.hidden = true; + this.selectObjects(rectBox); + } + }; + /** + * @private + * @return {?} + */ + FcRectangleSelectService.prototype.updateSelectRect = /** + * @private + * @return {?} + */ + function () { + /** @type {?} */ + var x3 = Math.min(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + var x4 = Math.max(this.selectRect.x1, this.selectRect.x2); + /** @type {?} */ + var y3 = Math.min(this.selectRect.y1, this.selectRect.y2); + /** @type {?} */ + var y4 = Math.max(this.selectRect.y1, this.selectRect.y2); + this.selectElement.style.left = x3 + 'px'; + this.selectElement.style.top = y3 + 'px'; + this.selectElement.style.width = x4 - x3 + 'px'; + this.selectElement.style.height = y4 - y3 + 'px'; + }; + /** + * @private + * @param {?} rectBox + * @return {?} + */ + FcRectangleSelectService.prototype.selectObjects = /** + * @private + * @param {?} rectBox + * @return {?} + */ + function (rectBox) { + var _this = this; + this.applyFunction((/** + * @return {?} + */ + function () { + _this.modelService.selectAllInRect(rectBox); + })); + }; + return FcRectangleSelectService; +}()); +if (false) { + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectRect; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.modelService; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.selectElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$canvasElement; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.$scrollParent; + /** + * @type {?} + * @private + */ + FcRectangleSelectService.prototype.applyFunction; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var NgxFlowchartComponent = /** @class */ (function () { + function NgxFlowchartComponent(elementRef, differs, modelValidation, edgeDrawingService, cd, zone) { + this.elementRef = elementRef; + this.differs = differs; + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.cd = cd; + this.zone = zone; + this.flowchartConstants = FlowchartConstants; + this.nodesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + function (index, item) { + return item; + })); + this.edgesDiffer = this.differs.find([]).create((/** + * @param {?} index + * @param {?} item + * @return {?} + */ + function (index, item) { + return item; + })); + this.arrowDefId = 'arrow-' + Math.random(); + this.arrowDefIdSelected = this.arrowDefId + '-selected'; + } + Object.defineProperty(NgxFlowchartComponent.prototype, "canvasClass", { + get: /** + * @return {?} + */ + function () { + return FlowchartConstants.canvasClass; + }, + enumerable: true, + configurable: true + }); + /** + * @return {?} + */ + NgxFlowchartComponent.prototype.ngOnInit = /** + * @return {?} + */ + function () { + var e_1, _a; + var _this = this; + if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) { + throw new Error('edgeStyle not supported.'); + } + this.nodeHeight = this.nodeHeight || 200; + this.nodeWidth = this.nodeWidth || 200; + this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint; + this.userCallbacks = this.userCallbacks || {}; + this.automaticResize = this.automaticResize || false; + try { + for (var _b = __values(Object.keys(this.userCallbacks)), _c = _b.next(); !_c.done; _c = _b.next()) { + var key = _c.value; + /** @type {?} */ + var callback = this.userCallbacks[key]; + if (typeof callback !== 'function' && key !== 'nodeCallbacks') { + throw new Error('All callbacks should be functions.'); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + this.userNodeCallbacks = this.userCallbacks.nodeCallbacks; + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects, this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved, this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg')); + if (this.dropTargetId) { + this.modelService.dropTargetId = this.dropTargetId; + } + /** @type {?} */ + var applyFunction = this.zone.run.bind(this.zone); + this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction, this.automaticResize, this.dragAnimation); + this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService, this.model, this.userCallbacks.isValidEdge || null, applyFunction, this.dragAnimation, this.edgeStyle); + this.mouseoverService = new FcMouseOverService(applyFunction); + this.rectangleSelectService = new FcRectangleSelectService(this.modelService, element[0].querySelector('#select-rectangle'), applyFunction); + this.callbacks = { + nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService), + nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService), + edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService), + edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService), + edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService), + edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService), + edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService), + edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService), + nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService), + nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService), + connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService), + connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService), + nodeClicked: (/** + * @param {?} event + * @param {?} node + * @return {?} + */ + function (event, node) { + _this.modelService.nodes.handleClicked(node, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + }) + }; + this.adjustCanvasSize(true); + }; + /** + * @return {?} + */ + NgxFlowchartComponent.prototype.ngDoCheck = /** + * @return {?} + */ + function () { + if (this.model) { + /** @type {?} */ + var nodesChange = this.nodesDiffer.diff(this.model.nodes); + /** @type {?} */ + var edgesChange = this.edgesDiffer.diff(this.model.edges); + /** @type {?} */ + var nodesChanged_1 = false; + /** @type {?} */ + var edgesChanged_1 = false; + if (nodesChange !== null) { + nodesChange.forEachAddedItem((/** + * @return {?} + */ + function () { + nodesChanged_1 = true; + })); + nodesChange.forEachRemovedItem((/** + * @return {?} + */ + function () { + nodesChanged_1 = true; + })); + } + if (edgesChange !== null) { + edgesChange.forEachAddedItem((/** + * @return {?} + */ + function () { + edgesChanged_1 = true; + })); + edgesChange.forEachRemovedItem((/** + * @return {?} + */ + function () { + edgesChanged_1 = true; + })); + } + if (nodesChanged_1) { + this.adjustCanvasSize(true); + } + if (nodesChanged_1 || edgesChanged_1) { + this.cd.detectChanges(); + } + } + }; + /** + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.getEdgeDAttribute = /** + * @param {?} edge + * @return {?} + */ + function (edge) { + return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge), this.modelService.edges.destCoord(edge), this.edgeStyle); + }; + /** + * @param {?=} fit + * @return {?} + */ + NgxFlowchartComponent.prototype.adjustCanvasSize = /** + * @param {?=} fit + * @return {?} + */ + function (fit) { + var _this = this; + /** @type {?} */ + var maxX = 0; + /** @type {?} */ + var maxY = 0; + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + this.model.nodes.forEach((/** + * @param {?} node + * @return {?} + */ + function (node) { + maxX = Math.max(node.x + _this.nodeWidth, maxX); + maxY = Math.max(node.y + _this.nodeHeight, maxY); + })); + /** @type {?} */ + var width; + /** @type {?} */ + var height; + if (fit) { + width = maxX; + height = maxY; + } + else { + width = Math.max(maxX, element.prop('offsetWidth')); + height = Math.max(maxY, element.prop('offsetHeight')); + } + element.css('width', width + 'px'); + element.css('height', height + 'px'); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.canvasClick = /** + * @param {?} event + * @return {?} + */ + function (event) { }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseDown = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + event.stopPropagation(); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeClick = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeRemove = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.modelService.edges.delete(edge); + event.stopPropagation(); + event.preventDefault(); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeEdit = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + if (this.userCallbacks.edgeEdit) { + this.userCallbacks.edgeEdit(event, edge); + } + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeDoubleClick = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + if (this.userCallbacks.edgeDoubleClick) { + this.userCallbacks.edgeDoubleClick(event, edge); + } + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseOver = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + if (this.userCallbacks.edgeMouseOver) { + this.userCallbacks.edgeMouseOver(event, edge); + } + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseEnter = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverService.edgeMouseEnter(event, edge); + }; + /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + NgxFlowchartComponent.prototype.edgeMouseLeave = /** + * @param {?} event + * @param {?} edge + * @return {?} + */ + function (event, edge) { + this.mouseoverService.edgeMouseLeave(event, edge); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.nodeDraggingService.dragover(event); + this.edgeDraggingService.dragover(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (event.preventDefault) { + event.preventDefault(); + } + if (event.stopPropagation) { + event.stopPropagation(); + } + this.nodeDraggingService.drop(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.mousedown = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.rectangleSelectService.mousedown(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.mousemove = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.rectangleSelectService.mousemove(event); + }; + /** + * @param {?} event + * @return {?} + */ + NgxFlowchartComponent.prototype.mouseup = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.rectangleSelectService.mouseup(event); + }; + NgxFlowchartComponent.decorators = [ + { type: Component, args: [{ + selector: 'fc-canvas', + template: "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {{edgeDraggingService.edgeDragging.dragLabel}}\n
\n
\n \n
\n
\n \n
\n
\n ×\n
\n {{edge.label}}\n
\n
\n \n\n", + changeDetection: ChangeDetectionStrategy.OnPush, + styles: [":host{display:block;position:relative;width:100%;height:100%;background-size:25px 25px;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.1) 1px,transparent 1px);background-color:transparent;min-width:100%;min-height:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-canvas-container{display:block;position:relative;width:100%;height:100%}:host .fc-canvas-container svg.fc-canvas-svg{display:block;position:relative;width:100%;height:100%}:host .fc-edge{stroke:gray;stroke-width:4;transition:stroke-width .2s;fill:transparent}:host .fc-edge.fc-hover{stroke:gray;stroke-width:6;fill:transparent}:host .fc-edge.fc-selected{stroke:red;stroke-width:4;fill:transparent}:host .fc-edge.fc-active{-webkit-animation:3s linear infinite dash;animation:3s linear infinite dash;stroke-dasharray:20}:host .fc-edge.fc-dragging{pointer-events:none}:host .fc-arrow-marker polygon{stroke:gray;fill:gray}:host .fc-arrow-marker-selected polygon{stroke:red;fill:red}:host .edge-endpoint{fill:gray}:host .fc-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-edge-label{position:absolute;opacity:.8;transition:transform .2s;transform-origin:bottom left;margin:0 auto}:host .fc-edge-label .fc-edge-label-text{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;text-align:center;font-size:16px}:host .fc-edge-label .fc-edge-label-text span{cursor:default;border:solid #ff3d00;border-radius:10px;color:#ff3d00;background-color:#fff;padding:3px 5px}:host .fc-edge-label .fc-nodeedit{top:-30px;right:14px}:host .fc-edge-label .fc-nodedelete{top:-30px;right:-13px}:host .fc-edge-label.fc-hover{transform:scale(1.25)}:host .fc-edge-label.fc-edit .fc-edge-label-text span,:host .fc-edge-label.fc-selected .fc-edge-label-text span{border:solid red;color:#fff;font-weight:600;background-color:red}:host .fc-select-rectangle{border:2px dashed #5262ff;position:absolute;background:rgba(20,125,255,.1);z-index:2}@-webkit-keyframes dash{from{stroke-dashoffset:500}}@keyframes dash{from{stroke-dashoffset:500}}:host ::ng-deep .fc-nodeedit{display:none;font-size:15px}:host ::ng-deep .fc-nodedelete{display:none;font-size:18px}:host ::ng-deep .fc-edit .fc-nodedelete,:host ::ng-deep .fc-edit .fc-nodeedit{display:block;position:absolute;border:2px solid #eee;border-radius:50%;font-weight:600;line-height:20px;height:20px;padding-top:2px;width:22px;background:#494949;color:#fff;text-align:center;vertical-align:bottom;cursor:pointer}:host ::ng-deep .fc-edit .fc-nodeedit{top:-24px;right:16px}:host ::ng-deep .fc-edit .fc-nodedelete{top:-24px;right:-13px}"] + }] } + ]; + /** @nocollapse */ + NgxFlowchartComponent.ctorParameters = function () { return [ + { type: ElementRef }, + { type: IterableDiffers }, + { type: FcModelValidationService }, + { type: FcEdgeDrawingService }, + { type: ChangeDetectorRef }, + { type: NgZone } + ]; }; + NgxFlowchartComponent.propDecorators = { + canvasClass: [{ type: HostBinding, args: ['attr.class',] }], + model: [{ type: Input }], + selectedObjects: [{ type: Input }], + edgeStyle: [{ type: Input }], + userCallbacks: [{ type: Input }], + automaticResize: [{ type: Input }], + dragAnimation: [{ type: Input }], + nodeWidth: [{ type: Input }], + nodeHeight: [{ type: Input }], + dropTargetId: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }], + mousemove: [{ type: HostListener, args: ['mousemove', ['$event'],] }], + mouseup: [{ type: HostListener, args: ['mouseup', ['$event'],] }] + }; + return NgxFlowchartComponent; +}()); +if (false) { + /** @type {?} */ + NgxFlowchartComponent.prototype.model; + /** @type {?} */ + NgxFlowchartComponent.prototype.selectedObjects; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeStyle; + /** @type {?} */ + NgxFlowchartComponent.prototype.userCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.automaticResize; + /** @type {?} */ + NgxFlowchartComponent.prototype.dragAnimation; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeWidth; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeHeight; + /** @type {?} */ + NgxFlowchartComponent.prototype.dropTargetId; + /** @type {?} */ + NgxFlowchartComponent.prototype.callbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.userNodeCallbacks; + /** @type {?} */ + NgxFlowchartComponent.prototype.modelService; + /** @type {?} */ + NgxFlowchartComponent.prototype.nodeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDraggingService; + /** @type {?} */ + NgxFlowchartComponent.prototype.mouseoverService; + /** @type {?} */ + NgxFlowchartComponent.prototype.rectangleSelectService; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefId; + /** @type {?} */ + NgxFlowchartComponent.prototype.arrowDefIdSelected; + /** @type {?} */ + NgxFlowchartComponent.prototype.flowchartConstants; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.nodesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.edgesDiffer; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.differs; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.modelValidation; + /** @type {?} */ + NgxFlowchartComponent.prototype.edgeDrawingService; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.cd; + /** + * @type {?} + * @private + */ + NgxFlowchartComponent.prototype.zone; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var FcMagnetDirective = /** @class */ (function () { + function FcMagnetDirective(elementRef) { + this.elementRef = elementRef; } - NgxFlowchartService.decorators = [ - { type: Injectable, args: [{ - providedIn: 'root' + /** + * @return {?} + */ + FcMagnetDirective.prototype.ngOnInit = /** + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.magnetClass); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + return this.callbacks.edgeDragoverMagnet(event, this.connector); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.dragleave = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.callbacks.edgeDragleaveMagnet(event); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + return this.callbacks.edgeDrop(event, this.connector); + }; + /** + * @param {?} event + * @return {?} + */ + FcMagnetDirective.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + this.callbacks.edgeDragend(event); + }; + FcMagnetDirective.decorators = [ + { type: Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-magnet]' },] } ]; /** @nocollapse */ - NgxFlowchartService.ctorParameters = function () { return []; }; - /** @nocollapse */ NgxFlowchartService.ngInjectableDef = ɵɵdefineInjectable({ factory: function NgxFlowchartService_Factory() { return new NgxFlowchartService(); }, token: NgxFlowchartService, providedIn: "root" }); - return NgxFlowchartService; + FcMagnetDirective.ctorParameters = function () { return [ + { type: ElementRef } + ]; }; + FcMagnetDirective.propDecorators = { + callbacks: [{ type: Input }], + connector: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + dragleave: [{ type: HostListener, args: ['dragleave', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }] + }; + return FcMagnetDirective; }()); +if (false) { + /** @type {?} */ + FcMagnetDirective.prototype.callbacks; + /** @type {?} */ + FcMagnetDirective.prototype.connector; + /** @type {?} */ + FcMagnetDirective.prototype.elementRef; +} /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ -var NgxFlowchartComponent = /** @class */ (function () { - function NgxFlowchartComponent() { +var FcConnectorDirective = /** @class */ (function () { + function FcConnectorDirective(elementRef) { + this.elementRef = elementRef; } /** * @return {?} */ - NgxFlowchartComponent.prototype.ngOnInit = /** + FcConnectorDirective.prototype.ngOnInit = /** * @return {?} */ function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.connectorClass); + if (this.modelservice.isEditable()) { + element.attr('draggable', 'true'); + this.updateConnectorClass(); + } + this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]); }; - NgxFlowchartComponent.decorators = [ + /** + * @param {?} changes + * @return {?} + */ + FcConnectorDirective.prototype.ngOnChanges = /** + * @param {?} changes + * @return {?} + */ + function (changes) { + var e_1, _a; + /** @type {?} */ + var updateConnector = false; + try { + for (var _b = __values(Object.keys(changes)), _c = _b.next(); !_c.done; _c = _b.next()) { + var propName = _c.value; + /** @type {?} */ + var change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (propName === 'mouseOverConnector') { + updateConnector = true; + } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (updateConnector && this.modelservice.isEditable()) { + this.updateConnectorClass(); + } + }; + /** + * @private + * @return {?} + */ + FcConnectorDirective.prototype.updateConnectorClass = /** + * @private + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + if (this.connector === this.mouseOverConnector) { + element.addClass(FlowchartConstants.hoverClass); + } + else { + element.removeClass(FlowchartConstants.hoverClass); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.dragover = /** + * @param {?} event + * @return {?} + */ + function (event) { + // Skip - conflict with magnet + /* if (this.modelservice.isEditable()) { + return this.callbacks.edgeDragoverConnector(event, this.connector); + }*/ + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.drop = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + return this.callbacks.edgeDrop(event, this.connector); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragend(event); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.dragstart = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragstart(event, this.connector); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.mouseenter = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseEnter(event, this.connector); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcConnectorDirective.prototype.mouseleave = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseLeave(event, this.connector); + } + }; + FcConnectorDirective.decorators = [ + { type: Directive, args: [{ + // tslint:disable-next-line:directive-selector + selector: '[fc-connector]' + },] } + ]; + /** @nocollapse */ + FcConnectorDirective.ctorParameters = function () { return [ + { type: ElementRef } + ]; }; + FcConnectorDirective.propDecorators = { + callbacks: [{ type: Input }], + modelservice: [{ type: Input }], + connector: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }], + drop: [{ type: HostListener, args: ['drop', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }], + dragstart: [{ type: HostListener, args: ['dragstart', ['$event'],] }], + mouseenter: [{ type: HostListener, args: ['mouseenter', ['$event'],] }], + mouseleave: [{ type: HostListener, args: ['mouseleave', ['$event'],] }] + }; + return FcConnectorDirective; +}()); +if (false) { + /** @type {?} */ + FcConnectorDirective.prototype.callbacks; + /** @type {?} */ + FcConnectorDirective.prototype.modelservice; + /** @type {?} */ + FcConnectorDirective.prototype.connector; + /** @type {?} */ + FcConnectorDirective.prototype.mouseOverConnector; + /** @type {?} */ + FcConnectorDirective.prototype.elementRef; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var FcNodeContainerComponent = /** @class */ (function () { + function FcNodeContainerComponent(nodeComponentConfig, elementRef, componentFactoryResolver) { + this.nodeComponentConfig = nodeComponentConfig; + this.elementRef = elementRef; + this.componentFactoryResolver = componentFactoryResolver; + } + Object.defineProperty(FcNodeContainerComponent.prototype, "nodeId", { + get: /** + * @return {?} + */ + function () { + return this.node.id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FcNodeContainerComponent.prototype, "top", { + get: /** + * @return {?} + */ + function () { + return this.node.y + 'px'; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FcNodeContainerComponent.prototype, "left", { + get: /** + * @return {?} + */ + function () { + return this.node.x + 'px'; + }, + enumerable: true, + configurable: true + }); + /** + * @return {?} + */ + FcNodeContainerComponent.prototype.ngOnInit = /** + * @return {?} + */ + function () { + if (!this.userNodeCallbacks) { + this.userNodeCallbacks = {}; + } + this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || ((/** + * @return {?} + */ + function () { })); + this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || ((/** + * @return {?} + */ + function () { })); + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.nodeClass); + if (!this.node.readonly) { + element.attr('draggable', 'true'); + } + this.updateNodeClass(); + this.modelservice.nodes.setHtmlElement(this.node.id, element[0]); + this.nodeContentContainer.clear(); + /** @type {?} */ + var componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType); + /** @type {?} */ + var componentRef = this.nodeContentContainer.createComponent(componentFactory); + this.nodeComponent = componentRef.instance; + this.nodeComponent.callbacks = this.callbacks; + this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks; + this.nodeComponent.node = this.node; + this.nodeComponent.modelservice = this.modelservice; + this.updateNodeComponent(); + }; + /** + * @param {?} changes + * @return {?} + */ + FcNodeContainerComponent.prototype.ngOnChanges = /** + * @param {?} changes + * @return {?} + */ + function (changes) { + var e_1, _a; + /** @type {?} */ + var updateNode = false; + try { + for (var _b = __values(Object.keys(changes)), _c = _b.next(); !_c.done; _c = _b.next()) { + var propName = _c.value; + /** @type {?} */ + var change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) { + updateNode = true; + } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (updateNode) { + this.updateNodeClass(); + this.updateNodeComponent(); + } + }; + /** + * @private + * @return {?} + */ + FcNodeContainerComponent.prototype.updateNodeClass = /** + * @private + * @return {?} + */ + function () { + /** @type {?} */ + var element = $(this.elementRef.nativeElement); + this.toggleClass(element, FlowchartConstants.selectedClass, this.selected); + this.toggleClass(element, FlowchartConstants.editClass, this.edit); + this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse); + this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging); + }; + /** + * @private + * @return {?} + */ + FcNodeContainerComponent.prototype.updateNodeComponent = /** + * @private + * @return {?} + */ + function () { + this.nodeComponent.selected = this.selected; + this.nodeComponent.edit = this.edit; + this.nodeComponent.underMouse = this.underMouse; + this.nodeComponent.mouseOverConnector = this.mouseOverConnector; + this.nodeComponent.dragging = this.dragging; + }; + /** + * @private + * @param {?} element + * @param {?} clazz + * @param {?} set + * @return {?} + */ + FcNodeContainerComponent.prototype.toggleClass = /** + * @private + * @param {?} element + * @param {?} clazz + * @param {?} set + * @return {?} + */ + function (element, clazz, set) { + if (set) { + element.addClass(clazz); + } + else { + element.removeClass(clazz); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.mousedown = /** + * @param {?} event + * @return {?} + */ + function (event) { + event.stopPropagation(); + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.dragstart = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeDragstart(event, this.node); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.dragend = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeDragend(event); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.click = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeClicked(event, this.node); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.mouseover = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOver(event, this.node); + } + }; + /** + * @param {?} event + * @return {?} + */ + FcNodeContainerComponent.prototype.mouseout = /** + * @param {?} event + * @return {?} + */ + function (event) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOut(event, this.node); + } + }; + FcNodeContainerComponent.decorators = [ { type: Component, args: [{ - selector: 'fc-canvas', - template: "\n

\n ngx-flowchart works!\n

\n " + selector: 'fc-node', + template: '', + styles: [":host{position:absolute;z-index:1}:host.fc-dragging{z-index:10}:host ::ng-deep .fc-leftConnectors,:host ::ng-deep .fc-rightConnectors{position:absolute;top:0;height:100%;display:flex;flex-direction:column;z-index:-10}:host ::ng-deep .fc-leftConnectors .fc-magnet,:host ::ng-deep .fc-rightConnectors .fc-magnet{align-items:center}:host ::ng-deep .fc-leftConnectors{left:-20px}:host ::ng-deep .fc-rightConnectors{right:-20px}:host ::ng-deep .fc-magnet{display:flex;flex-grow:1;height:60px;justify-content:center}:host ::ng-deep .fc-connector{width:18px;height:18px;border:10px solid transparent;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box;border-radius:50%;background-color:#f7a789;color:#fff;pointer-events:all}:host ::ng-deep .fc-connector.fc-hover{background-color:#000}"] }] } ]; /** @nocollapse */ - NgxFlowchartComponent.ctorParameters = function () { return []; }; - return NgxFlowchartComponent; + FcNodeContainerComponent.ctorParameters = function () { return [ + { type: undefined, decorators: [{ type: Inject, args: [FC_NODE_COMPONENT_CONFIG,] }] }, + { type: ElementRef }, + { type: ComponentFactoryResolver } + ]; }; + FcNodeContainerComponent.propDecorators = { + callbacks: [{ type: Input }], + userNodeCallbacks: [{ type: Input }], + node: [{ type: Input }], + selected: [{ type: Input }], + edit: [{ type: Input }], + underMouse: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + modelservice: [{ type: Input }], + dragging: [{ type: Input }], + nodeId: [{ type: HostBinding, args: ['attr.id',] }], + top: [{ type: HostBinding, args: ['style.top',] }], + left: [{ type: HostBinding, args: ['style.left',] }], + nodeContentContainer: [{ type: ViewChild, args: ['nodeContent', { read: ViewContainerRef, static: true },] }], + mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }], + dragstart: [{ type: HostListener, args: ['dragstart', ['$event'],] }], + dragend: [{ type: HostListener, args: ['dragend', ['$event'],] }], + click: [{ type: HostListener, args: ['click', ['$event'],] }], + mouseover: [{ type: HostListener, args: ['mouseover', ['$event'],] }], + mouseout: [{ type: HostListener, args: ['mouseout', ['$event'],] }] + }; + return FcNodeContainerComponent; +}()); +if (false) { + /** @type {?} */ + FcNodeContainerComponent.prototype.callbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeContainerComponent.prototype.node; + /** @type {?} */ + FcNodeContainerComponent.prototype.selected; + /** @type {?} */ + FcNodeContainerComponent.prototype.edit; + /** @type {?} */ + FcNodeContainerComponent.prototype.underMouse; + /** @type {?} */ + FcNodeContainerComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeContainerComponent.prototype.modelservice; + /** @type {?} */ + FcNodeContainerComponent.prototype.dragging; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeComponent; + /** @type {?} */ + FcNodeContainerComponent.prototype.nodeContentContainer; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.nodeComponentConfig; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.elementRef; + /** + * @type {?} + * @private + */ + FcNodeContainerComponent.prototype.componentFactoryResolver; +} +/** + * @abstract + */ +var FcNodeComponent = /** @class */ (function () { + function FcNodeComponent() { + this.flowchartConstants = FlowchartConstants; + } + /** + * @return {?} + */ + FcNodeComponent.prototype.ngOnInit = /** + * @return {?} + */ + function () { + }; + FcNodeComponent.propDecorators = { + callbacks: [{ type: Input }], + userNodeCallbacks: [{ type: Input }], + node: [{ type: Input }], + selected: [{ type: Input }], + edit: [{ type: Input }], + underMouse: [{ type: Input }], + mouseOverConnector: [{ type: Input }], + modelservice: [{ type: Input }], + dragging: [{ type: Input }] + }; + return FcNodeComponent; }()); +if (false) { + /** @type {?} */ + FcNodeComponent.prototype.callbacks; + /** @type {?} */ + FcNodeComponent.prototype.userNodeCallbacks; + /** @type {?} */ + FcNodeComponent.prototype.node; + /** @type {?} */ + FcNodeComponent.prototype.selected; + /** @type {?} */ + FcNodeComponent.prototype.edit; + /** @type {?} */ + FcNodeComponent.prototype.underMouse; + /** @type {?} */ + FcNodeComponent.prototype.mouseOverConnector; + /** @type {?} */ + FcNodeComponent.prototype.modelservice; + /** @type {?} */ + FcNodeComponent.prototype.dragging; + /** @type {?} */ + FcNodeComponent.prototype.flowchartConstants; +} + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +var DefaultFcNodeComponent = /** @class */ (function (_super) { + __extends(DefaultFcNodeComponent, _super); + function DefaultFcNodeComponent() { + return _super.call(this) || this; + } + DefaultFcNodeComponent.decorators = [ + { type: Component, args: [{ + selector: 'fc-default-node', + template: "\n
\n
\n

{{ node.name }}

\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n ×\n
\n\n", + styles: [":host .fc-node-overlay{position:absolute;pointer-events:none;left:0;top:0;right:0;bottom:0;background-color:#000;opacity:0}:host :host-context(.fc-hover) .fc-node-overlay{opacity:.25;transition:opacity .2s}:host :host-context(.fc-selected) .fc-node-overlay{opacity:.25}:host .innerNode{display:flex;justify-content:center;align-items:center;min-width:100px;border-radius:5px;background-color:#f15b26;color:#fff;font-size:16px;pointer-events:none}:host .innerNode p{padding:0 15px;text-align:center}"] + }] } + ]; + /** @nocollapse */ + DefaultFcNodeComponent.ctorParameters = function () { return []; }; + return DefaultFcNodeComponent; +}(FcNodeComponent)); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ +var ɵ0$1 = { + nodeComponentType: DefaultFcNodeComponent +}; var NgxFlowchartModule = /** @class */ (function () { function NgxFlowchartModule() { } NgxFlowchartModule.decorators = [ { type: NgModule, args: [{ - declarations: [NgxFlowchartComponent], - imports: [], - exports: [NgxFlowchartComponent] + entryComponents: [ + DefaultFcNodeComponent + ], + declarations: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + FcNodeContainerComponent, + DefaultFcNodeComponent], + providers: [ + FcModelValidationService, + FcEdgeDrawingService, + { + provide: FC_NODE_COMPONENT_CONFIG, + useValue: ɵ0$1 + } + ], + imports: [ + CommonModule + ], + exports: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + DefaultFcNodeComponent] },] } ]; return NgxFlowchartModule; @@ -71,5 +4320,5 @@ var NgxFlowchartModule = /** @class */ (function () { * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ -export { NgxFlowchartComponent, NgxFlowchartModule, NgxFlowchartService }; +export { FC_NODE_COMPONENT_CONFIG, FcNodeComponent, FlowchartConstants, ModelvalidationError, NgxFlowchartComponent, NgxFlowchartModule, fcTopSort, FcNodeContainerComponent as ɵa, FcModelValidationService as ɵb, FcEdgeDrawingService as ɵc, DefaultFcNodeComponent as ɵd, FcMagnetDirective as ɵe, FcConnectorDirective as ɵf }; //# sourceMappingURL=ngx-flowchart.js.map diff --git a/dist/ngx-flowchart/fesm5/ngx-flowchart.js.map b/dist/ngx-flowchart/fesm5/ngx-flowchart.js.map index ea43183..c44a298 100644 --- a/dist/ngx-flowchart/fesm5/ngx-flowchart.js.map +++ b/dist/ngx-flowchart/fesm5/ngx-flowchart.js.map @@ -1 +1 @@ -{"version":3,"file":"ngx-flowchart.js","sources":["ng://ngx-flowchart/lib/ngx-flowchart.service.ts","ng://ngx-flowchart/lib/ngx-flowchart.component.ts","ng://ngx-flowchart/lib/ngx-flowchart.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxFlowchartService {\n\n constructor() { }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'fc-canvas',\n template: `\n

\n ngx-flowchart works!\n

\n `,\n styles: []\n})\nexport class NgxFlowchartComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { NgxFlowchartComponent } from './ngx-flowchart.component';\n\n@NgModule({\n declarations: [NgxFlowchartComponent],\n imports: [\n ],\n exports: [NgxFlowchartComponent]\n})\nexport class NgxFlowchartModule { }\n"],"names":[],"mappings":";;;;;;AAAA;IAOE;KAAiB;;gBALlB,UAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;;;8BAJD;CAEA;;;;;;ACFA;IAaE;KAAiB;;;;IAEjB,wCAAQ;;;IAAR;KACC;;gBAdF,SAAS,SAAC;oBACT,QAAQ,EAAE,WAAW;oBACrB,QAAQ,EAAE,qDAIT;iBAEF;;;;IAQD,4BAAC;CAhBD;;;;;;ACFA;IAGA;KAMmC;;gBANlC,QAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;iBACjC;;IACiC,yBAAC;CANnC;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"ngx-flowchart.js","sources":["ng://ngx-flowchart/lib/ngx-flowchart.models.ts","ng://ngx-flowchart/lib/model.service.ts","ng://ngx-flowchart/lib/modelvalidation.service.ts","ng://ngx-flowchart/lib/node-dragging.service.ts","ng://ngx-flowchart/lib/edge-drawing.service.ts","ng://ngx-flowchart/lib/edge-dragging.service.ts","ng://ngx-flowchart/lib/mouseover.service.ts","ng://ngx-flowchart/lib/scrollparent.ts","ng://ngx-flowchart/lib/rectangleselect.service.ts","ng://ngx-flowchart/lib/ngx-flowchart.component.ts","ng://ngx-flowchart/lib/magnet.directive.ts","ng://ngx-flowchart/lib/connector.directive.ts","ng://ngx-flowchart/lib/node.component.ts","ng://ngx-flowchart/lib/default-node.component.ts","ng://ngx-flowchart/lib/ngx-flowchart.module.ts"],"sourcesContent":["import { Observable } from 'rxjs';\nimport { InjectionToken, Type } from '@angular/core';\nimport { FcNodeComponent } from './node.component';\n\nexport const FC_NODE_COMPONENT_CONFIG = new InjectionToken('fc-node.component.config');\n\nexport interface FcNodeComponentConfig {\n nodeComponentType: Type;\n}\n\nconst htmlPrefix = 'fc';\nconst leftConnectorType = 'leftConnector';\nconst rightConnectorType = 'rightConnector';\n\nexport const FlowchartConstants = {\n htmlPrefix,\n leftConnectorType,\n rightConnectorType,\n curvedStyle: 'curved',\n lineStyle: 'line',\n dragAnimationRepaint: 'repaint',\n dragAnimationShadow: 'shadow',\n canvasClass: htmlPrefix + '-canvas',\n selectedClass: htmlPrefix + '-selected',\n editClass: htmlPrefix + '-edit',\n activeClass: htmlPrefix + '-active',\n hoverClass: htmlPrefix + '-hover',\n draggingClass: htmlPrefix + '-dragging',\n edgeClass: htmlPrefix + '-edge',\n edgeLabelClass: htmlPrefix + '-edge-label',\n connectorClass: htmlPrefix + '-connector',\n magnetClass: htmlPrefix + '-magnet',\n nodeClass: htmlPrefix + '-node',\n nodeOverlayClass: htmlPrefix + '-node-overlay',\n leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's',\n rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's',\n canvasResizeThreshold: 200,\n canvasResizeStep: 200\n};\n\n\nexport interface FcCoords {\n x?: number;\n y?: number;\n}\n\nexport interface FcOffset {\n top: number;\n left: number;\n}\n\nexport interface FcRectBox {\n top: number;\n left: number;\n right: number;\n bottom: number;\n}\n\nexport interface FcConnector {\n id: string;\n type: string;\n}\n\nexport interface FcNode extends FcCoords {\n id: string;\n name: string;\n connectors: Array;\n readonly?: boolean;\n [key: string]: any;\n}\n\nexport interface FcEdge {\n label?: string;\n source?: string;\n destination?: string;\n active?: boolean;\n}\n\nexport interface FcItemInfo {\n node?: FcNode;\n edge?: FcEdge;\n}\n\nexport interface FcModel {\n nodes: Array;\n edges: Array;\n}\n\nexport interface UserCallbacks {\n dropNode?: (event: Event, node: FcNode) => void;\n createEdge?: (event: Event, edge: FcEdge) => Observable;\n edgeAdded?: (edge: FcEdge) => void;\n nodeRemoved?: (node: FcNode) => void;\n edgeRemoved?: (edge: FcEdge) => void;\n edgeDoubleClick?: (event: MouseEvent, edge: FcEdge) => void;\n edgeMouseOver?: (event: MouseEvent, edge: FcEdge) => void;\n isValidEdge?: (source: FcConnector, destination: FcConnector) => boolean;\n edgeEdit?: (event: Event, edge: FcEdge) => void;\n nodeCallbacks?: UserNodeCallbacks;\n}\n\nexport interface UserNodeCallbacks {\n nodeEdit?: (event: MouseEvent, node: FcNode) => void;\n doubleClick?: (event: MouseEvent, node: FcNode) => void;\n mouseDown?: (event: MouseEvent, node: FcNode) => void;\n mouseEnter?: (event: MouseEvent, node: FcNode) => void;\n mouseLeave?: (event: MouseEvent, node: FcNode) => void;\n}\n\nexport interface FcCallbacks {\n nodeDragstart: (event: DragEvent, node: FcNode) => void;\n nodeDragend: (event: DragEvent) => void;\n edgeDragstart: (event: DragEvent, connector: FcConnector) => void;\n edgeDragend: (event: DragEvent) => void;\n edgeDrop: (event: DragEvent, targetConnector: FcConnector) => boolean;\n edgeDragoverConnector: (event: DragEvent, connector: FcConnector) => boolean;\n edgeDragoverMagnet: (event: DragEvent, connector: FcConnector) => boolean;\n edgeDragleaveMagnet: (event: DragEvent) => void;\n nodeMouseOver: (event: MouseEvent, node: FcNode) => void;\n nodeMouseOut: (event: MouseEvent, node: FcNode) => void;\n connectorMouseEnter: (event: MouseEvent, connector: FcConnector) => void;\n connectorMouseLeave: (event: MouseEvent, connector: FcConnector) => void;\n nodeClicked: (event: MouseEvent, node: FcNode) => void;\n}\n\nexport interface FcAdjacentList {\n [id: string]: {\n incoming: number;\n outgoing: Array;\n };\n}\n\nexport class ModelvalidationError extends Error {\n constructor(message: string) {\n super(message);\n }\n}\n\nexport function fcTopSort(graph: FcModel): Array | null {\n const adjacentList: FcAdjacentList = {};\n graph.nodes.forEach((node) => {\n adjacentList[node.id] = {incoming: 0, outgoing: []};\n });\n graph.edges.forEach((edge) => {\n const sourceNode = graph.nodes.filter((node) => {\n return node.connectors.some((connector) => {\n return connector.id === edge.source;\n });\n })[0];\n const destinationNode = graph.nodes.filter((node) => {\n return node.connectors.some((connector) => {\n return connector.id === edge.destination;\n });\n })[0];\n adjacentList[sourceNode.id].outgoing.push(destinationNode.id);\n adjacentList[destinationNode.id].incoming++;\n });\n const orderedNodes: string[] = [];\n const sourceNodes: string[] = [];\n for (const node of Object.keys(adjacentList)) {\n const edges = adjacentList[node];\n if (edges.incoming === 0) {\n sourceNodes.push(node);\n }\n }\n while (sourceNodes.length !== 0) {\n const sourceNode = sourceNodes.pop();\n for (let i = 0; i < adjacentList[sourceNode].outgoing.length; i++) {\n const destinationNode = adjacentList[sourceNode].outgoing[i];\n adjacentList[destinationNode].incoming--;\n if (adjacentList[destinationNode].incoming === 0) {\n sourceNodes.push(destinationNode);\n }\n adjacentList[sourceNode].outgoing.splice(i, 1);\n i--;\n }\n orderedNodes.push(sourceNode);\n }\n let hasEdges = false;\n for (const node of Object.keys(adjacentList)) {\n const edges = adjacentList[node];\n if (edges.incoming !== 0) {\n hasEdges = true;\n }\n }\n if (hasEdges) {\n return null;\n } else {\n return orderedNodes;\n }\n}\n","import { FcModelValidationService } from './modelvalidation.service';\nimport { FcConnector, FcCoords, FcEdge, FcItemInfo, FcModel, FcNode, FcRectBox } from './ngx-flowchart.models';\nimport { Observable, of } from 'rxjs';\nimport { ChangeDetectorRef } from '@angular/core';\n\nexport class FcModelService {\n\n modelValidation: FcModelValidationService;\n model: FcModel;\n cd: ChangeDetectorRef;\n selectedObjects: any[];\n\n connectorsHtmlElements: HtmlElementMap = {};\n nodesHtmlElements: HtmlElementMap = {};\n canvasHtmlElement: HTMLElement = null;\n dragImage: HTMLImageElement = null;\n svgHtmlElement: SVGElement = null;\n\n dropNode: (event: Event, node: FcNode) => void;\n createEdge: (event: Event, edge: FcEdge) => Observable;\n edgeAddedCallback: (edge: FcEdge) => void;\n nodeRemovedCallback: (node: FcNode) => void;\n edgeRemovedCallback: (edge: FcEdge) => void;\n\n dropTargetId: string;\n\n connectors: ConnectorsModel;\n nodes: NodesModel;\n edges: EdgesModel;\n\n constructor(modelValidation: FcModelValidationService,\n model: FcModel,\n cd: ChangeDetectorRef,\n selectedObjects: any[],\n dropNode: (event: Event, node: FcNode) => void,\n createEdge: (event: Event, edge: FcEdge) => Observable,\n edgeAddedCallback: (edge: FcEdge) => void,\n nodeRemovedCallback: (node: FcNode) => void,\n edgeRemovedCallback: (edge: FcEdge) => void,\n canvasHtmlElement: HTMLElement,\n svgHtmlElement: SVGElement) {\n\n this.modelValidation = modelValidation;\n this.model = model;\n this.cd = cd;\n this.canvasHtmlElement = canvasHtmlElement;\n this.svgHtmlElement = svgHtmlElement;\n this.modelValidation.validateModel(this.model);\n this.selectedObjects = selectedObjects;\n\n this.dropNode = dropNode || (() => {});\n this.createEdge = createEdge || (() => of({label: 'label'}));\n this.edgeAddedCallback = edgeAddedCallback || (() => {});\n this.nodeRemovedCallback = nodeRemovedCallback || (() => {});\n this.edgeRemovedCallback = edgeRemovedCallback || (() => {});\n\n this.connectors = new ConnectorsModel(this);\n this.nodes = new NodesModel(this);\n this.edges = new EdgesModel(this);\n }\n\n public detectChanges() {\n setTimeout(() => {\n this.cd.detectChanges();\n }, 0);\n }\n\n public selectObject(object: any) {\n if (this.isEditable()) {\n if (this.selectedObjects.indexOf(object) === -1) {\n this.selectedObjects.push(object);\n }\n }\n }\n\n public deselectObject(object: any) {\n if (this.isEditable()) {\n const index = this.selectedObjects.indexOf(object);\n if (index === -1) {\n throw new Error('Tried to deselect an unselected object');\n }\n this.selectedObjects.splice(index, 1);\n }\n }\n\n public toggleSelectedObject(object: any) {\n if (this.isSelectedObject(object)) {\n this.deselectObject(object);\n } else {\n this.selectObject(object);\n }\n }\n\n public isSelectedObject(object: any): boolean {\n return this.selectedObjects.indexOf(object) !== -1;\n }\n\n public selectAll() {\n this.model.nodes.forEach(node => {\n if (!node.readonly) {\n this.nodes.select(node);\n }\n });\n this.model.edges.forEach(edge => {\n this.edges.select(edge);\n });\n this.detectChanges();\n }\n\n public deselectAll() {\n this.selectedObjects.splice(0, this.selectedObjects.length);\n this.detectChanges();\n }\n\n public isEditObject(object: any): boolean {\n return this.selectedObjects.length === 1 &&\n this.selectedObjects.indexOf(object) !== -1;\n }\n\n private inRectBox(x: number, y: number, rectBox: FcRectBox): boolean {\n return x >= rectBox.left && x <= rectBox.right &&\n y >= rectBox.top && y <= rectBox.bottom;\n }\n\n public getItemInfoAtPoint(x: number, y: number): FcItemInfo {\n return {\n node: this.getNodeAtPoint(x, y),\n edge: this.getEdgeAtPoint(x, y)\n };\n }\n\n public getNodeAtPoint(x: number, y: number): FcNode {\n for (const node of this.model.nodes) {\n const element = this.nodes.getHtmlElement(node.id);\n const nodeElementBox = element.getBoundingClientRect();\n if (x >= nodeElementBox.left && x <= nodeElementBox.right\n && y >= nodeElementBox.top && y <= nodeElementBox.bottom) {\n return node;\n }\n }\n return null;\n }\n\n public getEdgeAtPoint(x: number, y: number): FcEdge {\n const element = document.elementFromPoint(x, y);\n const id = element.id;\n let edgeIndex = -1;\n if (id) {\n if (id.startsWith('fc-edge-path-')) {\n edgeIndex = Number(id.substring('fc-edge-path-'.length));\n } else if (id.startsWith('fc-edge-label-')) {\n edgeIndex = Number(id.substring('fc-edge-label-'.length));\n }\n }\n if (edgeIndex > -1) {\n return this.model.edges[edgeIndex];\n }\n return null;\n }\n\n public selectAllInRect(rectBox: FcRectBox) {\n this.model.nodes.forEach((value) => {\n const element = this.nodes.getHtmlElement(value.id);\n const nodeElementBox = element.getBoundingClientRect();\n if (!value.readonly) {\n const x = nodeElementBox.left + nodeElementBox.width / 2;\n const y = nodeElementBox.top + nodeElementBox.height / 2;\n if (this.inRectBox(x, y, rectBox)) {\n this.nodes.select(value);\n } else {\n if (this.nodes.isSelected(value)) {\n this.nodes.deselect(value);\n }\n }\n }\n });\n const canvasElementBox = this.canvasHtmlElement.getBoundingClientRect();\n this.model.edges.forEach((value) => {\n const start = this.edges.sourceCoord(value);\n const end = this.edges.destCoord(value);\n const x = (start.x + end.x) / 2 + canvasElementBox.left;\n const y = (start.y + end.y) / 2 + canvasElementBox.top;\n if (this.inRectBox(x, y, rectBox)) {\n this.edges.select(value);\n } else {\n if (this.edges.isSelected(value)) {\n this.edges.deselect(value);\n }\n }\n });\n }\n\n public deleteSelected() {\n const edgesToDelete = this.edges.getSelectedEdges();\n edgesToDelete.forEach((edge) => {\n this.edges.delete(edge);\n });\n const nodesToDelete = this.nodes.getSelectedNodes();\n nodesToDelete.forEach((node) => {\n this.nodes.delete(node);\n });\n }\n\n public isEditable(): boolean {\n return this.dropTargetId === undefined;\n }\n\n public isDropSource(): boolean {\n return this.dropTargetId !== undefined;\n }\n\n public getDragImage(): HTMLImageElement {\n if (!this.dragImage) {\n this.dragImage = new Image();\n this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n this.dragImage.style.visibility = 'hidden';\n }\n return this.dragImage;\n }\n\n public registerCallbacks(edgeAddedCallback: (edge: FcEdge) => void,\n nodeRemovedCallback: (node: FcNode) => void,\n edgeRemovedCallback: (edge: FcEdge) => void) {\n this.edgeAddedCallback = edgeAddedCallback;\n this.nodeRemovedCallback = nodeRemovedCallback;\n this.edgeRemovedCallback = edgeRemovedCallback;\n }\n\n}\n\ninterface HtmlElementMap { [id: string]: HTMLElement; }\n\nabstract class AbstractFcModel {\n\n modelService: FcModelService;\n\n protected constructor(modelService: FcModelService) {\n this.modelService = modelService;\n }\n\n public select(object: T) {\n this.modelService.selectObject(object);\n }\n\n public deselect(object: T) {\n this.modelService.deselectObject(object);\n }\n\n public toggleSelected(object: T) {\n this.modelService.toggleSelectedObject(object);\n }\n\n public isSelected(object: T): boolean {\n return this.modelService.isSelectedObject(object);\n }\n\n public isEdit(object: T): boolean {\n return this.modelService.isEditObject(object);\n }\n}\n\nclass ConnectorsModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public getConnector(connectorId: string): FcConnector {\n const model = this.modelService.model;\n for (const node of model.nodes) {\n for (const connector of node.connectors) {\n if (connector.id === connectorId) {\n return connector;\n }\n }\n }\n }\n\n public getHtmlElement(connectorId: string): HTMLElement {\n return this.modelService.connectorsHtmlElements[connectorId];\n }\n\n public setHtmlElement(connectorId: string, element: HTMLElement) {\n this.modelService.connectorsHtmlElements[connectorId] = element;\n this.modelService.detectChanges();\n }\n\n private _getCoords(connectorId: string, centered?: boolean): FcCoords {\n const element = this.getHtmlElement(connectorId);\n const canvas = this.modelService.canvasHtmlElement;\n if (element === null || element === undefined || canvas === null) {\n return {x: 0, y: 0};\n }\n const connectorElementBox = element.getBoundingClientRect();\n const canvasElementBox = canvas.getBoundingClientRect();\n let coords: FcCoords = {\n x: connectorElementBox.left - canvasElementBox.left,\n y: connectorElementBox.top - canvasElementBox.top\n };\n if (centered) {\n coords = {\n x: Math.round(coords.x + element.offsetWidth / 2),\n y: Math.round(coords.y + element.offsetHeight / 2)\n };\n }\n return coords;\n }\n\n public getCoords(connectorId: string): FcCoords {\n return this._getCoords(connectorId, false);\n }\n\n public getCenteredCoord(connectorId: string): FcCoords {\n return this._getCoords(connectorId, true);\n }\n}\n\nclass NodesModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public getConnectorsByType(node: FcNode, type: string): Array {\n return node.connectors.filter((connector) => {\n return connector.type === type;\n });\n }\n\n private _addConnector(node: FcNode, connector: FcConnector) {\n node.connectors.push(connector);\n try {\n this.modelService.modelValidation.validateNode(node);\n } catch (error) {\n node.connectors.splice(node.connectors.indexOf(connector), 1);\n throw error;\n }\n }\n\n public delete(node: FcNode) {\n if (this.isSelected(node)) {\n this.deselect(node);\n }\n const model = this.modelService.model;\n const index = model.nodes.indexOf(node);\n if (index === -1) {\n if (node === undefined) {\n throw new Error('Passed undefined');\n }\n throw new Error('Tried to delete not existing node');\n }\n const connectorIds = this.getConnectorIds(node);\n for (let i = 0; i < model.edges.length; i++) {\n const edge = model.edges[i];\n if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) {\n this.modelService.edges.delete(edge);\n i--;\n }\n }\n model.nodes.splice(index, 1);\n this.modelService.nodeRemovedCallback(node);\n }\n\n public getSelectedNodes(): Array {\n const model = this.modelService.model;\n return model.nodes.filter((node) => {\n return this.modelService.nodes.isSelected(node);\n });\n }\n\n public handleClicked(node: FcNode, ctrlKey?: boolean) {\n if (ctrlKey) {\n this.modelService.nodes.toggleSelected(node);\n } else {\n this.modelService.deselectAll();\n this.modelService.nodes.select(node);\n }\n }\n\n private _addNode(node: FcNode) {\n const model = this.modelService.model;\n try {\n model.nodes.push(node);\n this.modelService.modelValidation.validateNodes(model.nodes);\n } catch (error) {\n model.nodes.splice(model.nodes.indexOf(node), 1);\n throw error;\n }\n }\n\n public getConnectorIds(node: FcNode): Array {\n return node.connectors.map((connector) => {\n return connector.id;\n });\n }\n\n public getNodeByConnectorId(connectorId: string): FcNode {\n const model = this.modelService.model;\n for (const node of model.nodes) {\n const connectorIds = this.getConnectorIds(node);\n if (connectorIds.indexOf(connectorId) > -1) {\n return node;\n }\n }\n return null;\n }\n\n public getHtmlElement(nodeId: string): HTMLElement {\n return this.modelService.nodesHtmlElements[nodeId];\n }\n\n public setHtmlElement(nodeId: string, element: HTMLElement) {\n this.modelService.nodesHtmlElements[nodeId] = element;\n this.modelService.detectChanges();\n }\n\n}\n\nclass EdgesModel extends AbstractFcModel {\n\n constructor(modelService: FcModelService) {\n super(modelService);\n }\n\n public ready(edge: FcEdge): boolean {\n const source = this.modelService.connectors.getHtmlElement(edge.source);\n const destination = this.modelService.connectors.getHtmlElement(edge.destination);\n return source !== undefined && destination !== undefined;\n }\n\n public sourceCoord(edge: FcEdge): FcCoords {\n return this.modelService.connectors.getCenteredCoord(edge.source);\n }\n\n public destCoord(edge: FcEdge): FcCoords {\n return this.modelService.connectors.getCenteredCoord(edge.destination);\n }\n\n public delete(edge: FcEdge) {\n const model = this.modelService.model;\n const index = model.edges.indexOf(edge);\n if (index === -1) {\n throw new Error('Tried to delete not existing edge');\n }\n if (this.isSelected(edge)) {\n this.deselect(edge);\n }\n model.edges.splice(index, 1);\n this.modelService.edgeRemovedCallback(edge);\n }\n\n public getSelectedEdges(): Array {\n const model = this.modelService.model;\n return model.edges.filter((edge) => {\n return this.modelService.edges.isSelected(edge);\n });\n }\n\n public handleEdgeMouseClick(edge: FcEdge, ctrlKey?: boolean) {\n if (ctrlKey) {\n this.modelService.edges.toggleSelected(edge);\n } else {\n this.modelService.deselectAll();\n this.modelService.edges.select(edge);\n }\n }\n\n public putEdge(edge: FcEdge) {\n const model = this.modelService.model;\n model.edges.push(edge);\n }\n\n public _addEdge(event: Event, sourceConnector: FcConnector, destConnector: FcConnector, label: string) {\n this.modelService.modelValidation.validateConnector(sourceConnector);\n this.modelService.modelValidation.validateConnector(destConnector);\n const edge: FcEdge = {};\n edge.source = sourceConnector.id;\n edge.destination = destConnector.id;\n edge.label = label;\n const model = this.modelService.model;\n this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes);\n this.modelService.createEdge(event, edge).subscribe(\n (created) => {\n model.edges.push(created);\n this.modelService.edgeAddedCallback(created);\n }\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { FcConnector, FcEdge, FcModel, FcNode, fcTopSort, ModelvalidationError } from './ngx-flowchart.models';\n\n@Injectable()\nexport class FcModelValidationService {\n\n constructor() { }\n\n public validateModel(model: FcModel): FcModel {\n this.validateNodes(model.nodes);\n this._validateEdges(model.edges, model.nodes);\n return model;\n }\n\n public validateNodes(nodes: Array): Array {\n const ids: string[] = [];\n nodes.forEach((node) => {\n this.validateNode(node);\n if (ids.indexOf(node.id) !== -1) {\n throw new ModelvalidationError('Id not unique.');\n }\n ids.push(node.id);\n });\n const connectorIds: string[] = [];\n nodes.forEach((node) => {\n node.connectors.forEach((connector) => {\n if (connectorIds.indexOf(connector.id) !== -1) {\n throw new ModelvalidationError('Id not unique.');\n }\n connectorIds.push(connector.id);\n });\n });\n return nodes;\n }\n\n public validateNode(node: FcNode): FcNode {\n if (node.id === undefined) {\n throw new ModelvalidationError('Id not valid.');\n }\n if (typeof node.name !== 'string') {\n throw new ModelvalidationError('Name not valid.');\n }\n if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) {\n throw new ModelvalidationError('Coordinates not valid.');\n }\n if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) {\n throw new ModelvalidationError('Coordinates not valid.');\n }\n if (!Array.isArray(node.connectors)) {\n throw new ModelvalidationError('Connectors not valid.');\n }\n node.connectors.forEach((connector) => {\n this.validateConnector(connector);\n });\n return node;\n }\n\n private _validateEdges(edges: Array, nodes: Array): Array {\n edges.forEach((edge) => {\n this._validateEdge(edge, nodes);\n });\n edges.forEach((edge1, index1) => {\n edges.forEach((edge2, index2) => {\n if (index1 !== index2) {\n if ((edge1.source === edge2.source && edge1.destination === edge2.destination) ||\n (edge1.source === edge2.destination && edge1.destination === edge2.source)) {\n throw new ModelvalidationError('Duplicated edge.');\n }\n }\n });\n });\n if (fcTopSort({nodes, edges}) === null) {\n throw new ModelvalidationError('Graph has a circle.');\n }\n return edges;\n }\n\n public validateEdges(edges: Array, nodes: Array): Array {\n this.validateNodes(nodes);\n return this._validateEdges(edges, nodes);\n }\n\n private _validateEdge(edge: FcEdge, nodes: Array): FcEdge {\n if (edge.source === undefined) {\n throw new ModelvalidationError('Source not valid.');\n }\n if (edge.destination === undefined) {\n throw new ModelvalidationError('Destination not valid.');\n }\n if (edge.source === edge.destination) {\n throw new ModelvalidationError('Edge with same source and destination connectors.');\n }\n const sourceNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.source))[0];\n if (sourceNode === undefined) {\n throw new ModelvalidationError('Source not valid.');\n }\n const destinationNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.destination))[0];\n if (destinationNode === undefined) {\n throw new ModelvalidationError('Destination not valid.');\n }\n if (sourceNode === destinationNode) {\n throw new ModelvalidationError('Edge with same source and destination nodes.');\n }\n return edge;\n }\n\n public validateEdge(edge: FcEdge, nodes: Array): FcEdge {\n this.validateNodes(nodes);\n return this._validateEdge(edge, nodes);\n }\n\n public validateConnector(connector: FcConnector): FcConnector {\n if (connector.id === undefined) {\n throw new ModelvalidationError('Id not valid.');\n }\n if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') {\n throw new ModelvalidationError('Type not valid.');\n }\n return connector;\n }\n\n}\n","import { FcModelService } from './model.service';\nimport { FcCoords, FcNode, FlowchartConstants } from './ngx-flowchart.models';\n\nconst nodeDropScope: NodeDropScope = {\n dropElement: null\n};\n\nexport class FcNodeDraggingService {\n\n nodeDraggingScope: NodeDraggingScope = {\n shadowDragStarted: false,\n dropElement: null,\n draggedNodes: [],\n shadowElements: []\n };\n\n private dragOffsets: FcCoords[] = [];\n private draggedElements: HTMLElement[] = [];\n\n private destinationHtmlElements: HTMLElement[] = [];\n private oldDisplayStyles: string[] = [];\n\n private readonly modelService: FcModelService;\n private readonly automaticResize: boolean;\n private readonly dragAnimation: string;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(modelService: FcModelService,\n applyFunction: (fn: (...args: any[]) => T) => T,\n automaticResize: boolean, dragAnimation: string) {\n this.modelService = modelService;\n this.automaticResize = automaticResize;\n this.dragAnimation = dragAnimation;\n this.applyFunction = applyFunction;\n }\n\n private getCoordinate(coordinate: number, max: number): number {\n coordinate = Math.max(coordinate, 0);\n coordinate = Math.min(coordinate, max);\n return coordinate;\n }\n\n private getXCoordinate(x: number): number {\n return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth);\n }\n\n private getYCoordinate(y: number): number {\n return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight);\n }\n\n private resizeCanvas(draggedNode: FcNode, nodeElement: HTMLElement) {\n if (this.automaticResize && !this.modelService.isDropSource()) {\n const canvasElement = this.modelService.canvasHtmlElement;\n if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) {\n canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px';\n }\n if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) {\n canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px';\n }\n }\n }\n\n public isDraggingNode(node: FcNode): boolean {\n return this.nodeDraggingScope.draggedNodes.includes(node);\n }\n\n public dragstart(event: DragEvent, node: FcNode) {\n if (node.readonly) {\n return;\n }\n this.dragOffsets.length = 0;\n this.draggedElements.length = 0;\n this.nodeDraggingScope.draggedNodes.length = 0;\n this.nodeDraggingScope.shadowElements.length = 0;\n this.destinationHtmlElements.length = 0;\n this.oldDisplayStyles.length = 0;\n const elements: Array> = [];\n const nodes: Array = [];\n if (this.modelService.nodes.isSelected(node)) {\n const selectedNodes = this.modelService.nodes.getSelectedNodes();\n for (const selectedNode of selectedNodes) {\n const element = $(this.modelService.nodes.getHtmlElement(selectedNode.id));\n elements.push(element);\n nodes.push(selectedNode);\n }\n } else {\n elements.push($(event.target as HTMLElement));\n nodes.push(node);\n }\n const offsetsX: number[] = [];\n const offsetsY: number[] = [];\n for (const element of elements) {\n offsetsX.push(parseInt(element.css('left'), 10) - event.clientX);\n offsetsY.push(parseInt(element.css('top'), 10) - event.clientY);\n }\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n if (this.modelService.isDropSource()) {\n if (nodeDropScope.dropElement) {\n nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement);\n nodeDropScope.dropElement = null;\n }\n nodeDropScope.dropElement = elements[0][0].cloneNode(true) as NodeDropElement;\n const offset = $(this.modelService.canvasHtmlElement).offset();\n nodeDropScope.dropElement.offsetInfo = {\n offsetX: Math.round(offsetsX[0] + offset.left),\n offsetY: Math.round(offsetsY[0] + offset.top)\n };\n nodeDropScope.dropElement.style.position = 'absolute';\n nodeDropScope.dropElement.style.pointerEvents = 'none';\n nodeDropScope.dropElement.style.zIndex = '9999';\n\n document.body.appendChild(nodeDropScope.dropElement);\n const dropNodeInfo: DropNodeInfo = {\n node,\n dropTargetId: this.modelService.dropTargetId,\n offsetX: Math.round(offsetsX[0] + offset.left),\n offsetY: Math.round(offsetsY[0] + offset.top)\n };\n originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo));\n\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n const target: HTMLElement = event.target as HTMLElement;\n this.destinationHtmlElements.push(target);\n this.oldDisplayStyles.push(target.style.display);\n target.style.display = 'none';\n this.nodeDraggingScope.shadowDragStarted = true;\n }\n return;\n }\n this.nodeDraggingScope.draggedNodes = nodes;\n for (let i = 0; i < elements.length; i++) {\n this.draggedElements.push(elements[i][0]);\n this.dragOffsets.push(\n {\n x: offsetsX[i],\n y: offsetsY[i]\n }\n );\n }\n\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n for (let i = 0; i < this.draggedElements.length; i++) {\n const dragOffset = this.dragOffsets[i];\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const shadowElement = $(`
` +\n `

${draggedNode.name}

`);\n const targetInnerNode = $(this.draggedElements[i]).children()[0];\n shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor;\n this.nodeDraggingScope.shadowElements.push(shadowElement);\n this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]);\n }\n }\n originalEvent.dataTransfer.setData('text', 'Just to support firefox');\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n for (let i = 0; i < this.draggedElements.length; i++) {\n this.destinationHtmlElements.push(this.draggedElements[i]);\n this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display);\n this.destinationHtmlElements[i].style.display = 'none';\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.nodeDraggingScope.shadowDragStarted = true;\n }\n }\n }\n\n public drop(event: DragEvent): boolean {\n if (this.modelService.isDropSource()) {\n event.preventDefault();\n return false;\n }\n let dropNode: FcNode = null;\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n const infoText = originalEvent.dataTransfer.getData('text');\n if (infoText) {\n let dropNodeInfo: DropNodeInfo = null;\n try {\n dropNodeInfo = JSON.parse(infoText);\n } catch (e) {}\n if (dropNodeInfo && dropNodeInfo.dropTargetId) {\n if (this.modelService.canvasHtmlElement.id &&\n this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) {\n dropNode = dropNodeInfo.node;\n const offset = $(this.modelService.canvasHtmlElement).offset();\n const x = event.clientX - offset.left;\n const y = event.clientY - offset.top;\n dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x));\n dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y));\n }\n }\n }\n if (dropNode) {\n this.modelService.dropNode(event, dropNode);\n event.preventDefault();\n return false;\n } else if (this.nodeDraggingScope.draggedNodes.length) {\n return this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n draggedNode.x = Math.round(this.getXCoordinate(dragOffset.x + event.clientX));\n draggedNode.y = Math.round(this.getYCoordinate(dragOffset.y + event.clientY));\n }\n event.preventDefault();\n return false;\n });\n }\n }\n\n public dragover(event: DragEvent) {\n if (nodeDropScope.dropElement) {\n const offsetInfo = nodeDropScope.dropElement.offsetInfo;\n nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px';\n nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px';\n if (this.nodeDraggingScope.shadowDragStarted) {\n this.applyFunction(() => {\n this.destinationHtmlElements[0].style.display = this.oldDisplayStyles[0];\n this.nodeDraggingScope.shadowDragStarted = false;\n });\n }\n event.preventDefault();\n return;\n }\n if (this.modelService.isDropSource()) {\n event.preventDefault();\n return;\n }\n if (!this.nodeDraggingScope.draggedNodes.length) {\n event.preventDefault();\n return;\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n if (this.nodeDraggingScope.draggedNodes.length) {\n return this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n draggedNode.x = this.getXCoordinate(dragOffset.x + event.clientX);\n draggedNode.y = this.getYCoordinate(dragOffset.y + event.clientY);\n this.resizeCanvas(draggedNode, this.draggedElements[i]);\n }\n event.preventDefault();\n return false;\n });\n }\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.nodeDraggingScope.draggedNodes.length) {\n if (this.nodeDraggingScope.shadowDragStarted) {\n this.applyFunction(() => {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n this.destinationHtmlElements[i].style.display = this.oldDisplayStyles[i];\n }\n this.nodeDraggingScope.shadowDragStarted = false;\n });\n }\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const dragOffset = this.dragOffsets[i];\n this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px');\n this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px');\n this.resizeCanvas(draggedNode, this.draggedElements[i]);\n }\n event.preventDefault();\n }\n }\n }\n\n public dragend(event: DragEvent) {\n this.applyFunction(() => {\n if (nodeDropScope.dropElement) {\n nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement);\n nodeDropScope.dropElement = null;\n }\n if (this.modelService.isDropSource()) {\n return;\n }\n if (this.nodeDraggingScope.shadowElements.length) {\n for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) {\n const draggedNode = this.nodeDraggingScope.draggedNodes[i];\n const shadowElement = this.nodeDraggingScope.shadowElements[i];\n draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10);\n draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10);\n this.modelService.canvasHtmlElement.removeChild(shadowElement[0]);\n }\n this.nodeDraggingScope.shadowElements.length = 0;\n }\n\n if (this.nodeDraggingScope.draggedNodes.length) {\n this.nodeDraggingScope.draggedNodes.length = 0;\n this.draggedElements.length = 0;\n this.dragOffsets.length = 0;\n }\n });\n }\n\n}\n\nexport interface NodeDraggingScope {\n draggedNodes: Array;\n shadowElements: Array>;\n shadowDragStarted: boolean;\n dropElement: HTMLElement;\n}\n\nexport interface NodeDropElement extends HTMLElement {\n offsetInfo?: {\n offsetX: number;\n offsetY: number;\n };\n}\n\nexport interface NodeDropScope {\n dropElement: NodeDropElement;\n}\n\nexport interface DropNodeInfo {\n node: FcNode;\n dropTargetId: string;\n offsetX: number;\n offsetY: number;\n}\n","import { Injectable } from '@angular/core';\nimport { FcCoords, FlowchartConstants } from './ngx-flowchart.models';\n\n@Injectable()\nexport class FcEdgeDrawingService {\n\n constructor() {\n }\n\n public getEdgeDAttribute(pt1: FcCoords, pt2: FcCoords, style: string): string {\n let dAddribute = `M ${pt1.x}, ${pt1.y} `;\n if (style === FlowchartConstants.curvedStyle) {\n const sourceTangent = this.computeEdgeSourceTangent(pt1, pt2);\n const destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2);\n dAddribute += `C ${sourceTangent.x}, ${sourceTangent.y} ${(destinationTangent.x - 50)}, ${destinationTangent.y} ${pt2.x}, ${pt2.y}`;\n } else {\n dAddribute += `L ${pt2.x}, ${pt2.y}`;\n }\n return dAddribute;\n }\n\n public getEdgeCenter(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: (pt1.x + pt2.x) / 2,\n y: (pt1.y + pt2.y) / 2\n };\n }\n\n private computeEdgeTangentOffset(pt1: FcCoords, pt2: FcCoords): number {\n return (pt2.y - pt1.y) / 2;\n }\n\n private computeEdgeSourceTangent(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: pt1.x,\n y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2)\n };\n }\n\n private computeEdgeDestinationTangent(pt1: FcCoords, pt2: FcCoords): FcCoords {\n return {\n x: pt2.x,\n y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2)\n };\n }\n\n}\n","import { FcModelService } from './model.service';\nimport { FcConnector, FcCoords, FcEdge, FcModel, FlowchartConstants, ModelvalidationError } from './ngx-flowchart.models';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { FcModelValidationService } from './modelvalidation.service';\n\nexport class FcEdgeDraggingService {\n\n edgeDragging: EdgeDragging = {\n isDragging: false,\n dragPoint1: null,\n dragPoint2: null,\n shadowDragStarted: false\n };\n\n private draggedEdgeSource: FcConnector = null;\n private dragOffset: FcCoords = {};\n private destinationHtmlElement: HTMLElement = null;\n private oldDisplayStyle = '';\n\n private readonly modelValidation: FcModelValidationService;\n private readonly edgeDrawingService: FcEdgeDrawingService;\n private readonly modelService: FcModelService;\n private readonly model: FcModel;\n private readonly isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n private readonly dragAnimation: string;\n private readonly edgeStyle: string;\n\n constructor(modelValidation: FcModelValidationService,\n edgeDrawingService: FcEdgeDrawingService,\n modelService: FcModelService,\n model: FcModel,\n isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean,\n applyFunction: (fn: (...args: any[]) => T) => T,\n dragAnimation: string,\n edgeStyle: string) {\n this.modelValidation = modelValidation;\n this.edgeDrawingService = edgeDrawingService;\n this.modelService = modelService;\n this.model = model;\n this.isValidEdgeCallback = isValidEdgeCallback || (() => true);\n this.applyFunction = applyFunction;\n this.dragAnimation = dragAnimation;\n this.edgeStyle = edgeStyle;\n }\n\n public dragstart(event: DragEvent, connector: FcConnector) {\n let swapConnector: FcConnector;\n let dragLabel: string;\n let prevEdge: FcEdge;\n if (connector.type === FlowchartConstants.leftConnectorType) {\n for (const edge of this.model.edges) {\n if (edge === connector.id) {\n swapConnector = this.modelService.connectors.getConnector(edge.source);\n dragLabel = edge.label;\n prevEdge = edge;\n this.applyFunction(() => {\n this.modelService.edges.delete(edge);\n });\n break;\n }\n }\n }\n this.edgeDragging.isDragging = true;\n if (swapConnector !== undefined) {\n this.draggedEdgeSource = swapConnector;\n this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id);\n this.edgeDragging.dragLabel = dragLabel;\n this.edgeDragging.prevEdge = prevEdge;\n } else {\n this.draggedEdgeSource = connector;\n this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id);\n }\n const canvas = this.modelService.canvasHtmlElement;\n if (!canvas) {\n throw new Error('No canvas while edgedraggingService found.');\n }\n this.dragOffset.x = -canvas.getBoundingClientRect().left;\n this.dragOffset.y = -canvas.getBoundingClientRect().top;\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n const originalEvent: DragEvent = (event as any).originalEvent || event;\n\n originalEvent.dataTransfer.setData('Text', 'Just to support firefox');\n if (originalEvent.dataTransfer.setDragImage) {\n originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0);\n } else {\n this.destinationHtmlElement = event.target as HTMLElement;\n this.oldDisplayStyle = this.destinationHtmlElement.style.display;\n this.destinationHtmlElement.style.display = 'none';\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.edgeDragging.shadowDragStarted = true;\n }\n }\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.edgeDragging.gElement === undefined) {\n this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class'));\n this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path');\n this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle');\n }\n\n this.edgeDragging.gElement.css('display', 'block');\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n }\n event.stopPropagation();\n }\n\n public dragover(event: DragEvent) {\n if (this.edgeDragging.isDragging) {\n if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n if (this.destinationHtmlElement !== null) {\n this.destinationHtmlElement.style.display = this.oldDisplayStyle;\n }\n\n if (this.edgeDragging.shadowDragStarted) {\n this.applyFunction(() => {\n this.edgeDragging.shadowDragStarted = false;\n });\n }\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n return this.applyFunction(() => {\n if (this.destinationHtmlElement !== null) {\n this.destinationHtmlElement.style.display = this.oldDisplayStyle;\n }\n\n this.edgeDragging.dragPoint2 = {\n x: event.clientX + this.dragOffset.x,\n y: event.clientY + this.dragOffset.y\n };\n });\n }\n }\n }\n\n public dragoverConnector(event: DragEvent, connector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n this.dragover(event);\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: connector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n }\n }\n\n public dragleaveMagnet(event: DragEvent) {\n this.edgeDragging.magnetActive = false;\n }\n\n public dragoverMagnet(event: DragEvent, connector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n this.dragover(event);\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: connector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) {\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n\n this.edgeDragging.magnetActive = true;\n\n this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id);\n this.edgeDragging.pathElement.attr('d',\n this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle));\n this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x);\n this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y);\n\n event.preventDefault();\n event.stopPropagation();\n return false;\n } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) {\n return this.applyFunction(() => {\n this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id);\n event.preventDefault();\n event.stopPropagation();\n return false;\n });\n }\n }\n }\n }\n\n public dragend(event: DragEvent) {\n if (this.edgeDragging.isDragging) {\n this.edgeDragging.isDragging = false;\n this.edgeDragging.dragPoint1 = null;\n this.edgeDragging.dragPoint2 = null;\n this.edgeDragging.dragLabel = null;\n event.stopPropagation();\n\n if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) {\n this.edgeDragging.gElement.css('display', 'none');\n }\n if (this.edgeDragging.prevEdge) {\n const edge = this.edgeDragging.prevEdge;\n this.edgeDragging.prevEdge = null;\n this.applyFunction(() => {\n this.modelService.edges.putEdge(edge);\n });\n }\n }\n }\n\n public drop(event: DragEvent, targetConnector: FcConnector): boolean {\n if (this.edgeDragging.isDragging) {\n try {\n this.modelValidation.validateEdges(this.model.edges.concat([{\n source: this.draggedEdgeSource.id,\n destination: targetConnector.id\n }]), this.model.nodes);\n } catch (error) {\n if (error instanceof ModelvalidationError) {\n return true;\n } else {\n throw error;\n }\n }\n\n if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) {\n this.edgeDragging.prevEdge = null;\n this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel);\n event.stopPropagation();\n event.preventDefault();\n return false;\n }\n }\n }\n}\n\nexport interface EdgeDragging {\n isDragging: boolean;\n shadowDragStarted: boolean;\n dragPoint1: FcCoords;\n dragPoint2: FcCoords;\n dragLabel?: string;\n prevEdge?: FcEdge;\n magnetActive?: boolean;\n gElement?: JQuery;\n pathElement?: JQuery;\n circleElement?: JQuery;\n}\n","import { FcConnector, FcEdge, FcNode } from './ngx-flowchart.models';\n\nexport class FcMouseOverService {\n\n mouseoverscope: MouseOverScope = {\n connector: null,\n edge: null,\n node: null\n };\n\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(applyFunction: (fn: (...args: any[]) => T) => T) {\n this.applyFunction = applyFunction;\n }\n\n public nodeMouseOver(event: MouseEvent, node: FcNode) {\n return this.applyFunction(() => {\n this.mouseoverscope.node = node;\n });\n }\n\n public nodeMouseOut(event: MouseEvent, node: FcNode) {\n return this.applyFunction(() => {\n this.mouseoverscope.node = null;\n });\n }\n\n public connectorMouseEnter(event: MouseEvent, connector: FcConnector) {\n return this.applyFunction(() => {\n this.mouseoverscope.connector = connector;\n });\n }\n\n public connectorMouseLeave(event: MouseEvent, connector: FcConnector) {\n return this.applyFunction(() => {\n this.mouseoverscope.connector = null;\n });\n }\n\n public edgeMouseEnter(event: MouseEvent, edge: FcEdge) {\n this.mouseoverscope.edge = edge;\n }\n\n public edgeMouseLeave(event: MouseEvent, edge: FcEdge) {\n this.mouseoverscope.edge = null;\n }\n}\n\nexport interface MouseOverScope {\n connector: FcConnector;\n edge: FcEdge;\n node: FcNode;\n}\n","const regex = /(auto|scroll)/;\n\nconst style = (node: Element, prop: string): string =>\n getComputedStyle(node, null).getPropertyValue(prop);\n\nconst scroll = (node: Element) =>\n regex.test(\n style(node, 'overflow') +\n style(node, 'overflow-y') +\n style(node, 'overflow-x'));\n\nconst scrollparent = (node: HTMLElement): HTMLElement =>\n !node || node === document.body\n ? document.body\n : scroll(node)\n ? node\n : scrollparent(node.parentNode as HTMLElement);\n\nexport default scrollparent;\n","import { FcModelService } from './model.service';\nimport { FcRectBox } from 'ngx-flowchart-dev';\nimport scrollparent from './scrollparent';\n\ninterface Rectangle {\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n}\n\nexport class FcRectangleSelectService {\n\n private readonly selectRect: Rectangle = {\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 0\n };\n\n private readonly modelService: FcModelService;\n private readonly selectElement: HTMLElement;\n private readonly $canvasElement: JQuery;\n private readonly $scrollParent: JQuery;\n private readonly applyFunction: (fn: (...args: any[]) => T) => T;\n\n constructor(modelService: FcModelService,\n selectElement: HTMLElement,\n applyFunction: (fn: (...args: any[]) => T) => T) {\n this.modelService = modelService;\n this.selectElement = selectElement;\n this.$canvasElement = $(this.modelService.canvasHtmlElement);\n this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement));\n this.applyFunction = applyFunction;\n }\n\n public mousedown(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && this.selectElement.hidden) {\n this.selectElement.hidden = false;\n const offset = this.$canvasElement.offset();\n this.selectRect.x1 = Math.round(e.pageX - offset.left);\n this.selectRect.y1 = Math.round(e.pageY - offset.top);\n this.selectRect.x2 = this.selectRect.x1;\n this.selectRect.y2 = this.selectRect.y1;\n this.updateSelectRect();\n }\n }\n\n public mousemove(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && !this.selectElement.hidden) {\n const offset = this.$canvasElement.offset();\n this.selectRect.x2 = Math.round(e.pageX - offset.left);\n this.selectRect.y2 = Math.round(e.pageY - offset.top);\n this.updateScroll(offset);\n this.updateSelectRect();\n }\n }\n\n private updateScroll(offset: JQuery.Coordinates) {\n const rect = this.$scrollParent[0].getBoundingClientRect();\n const bottom = rect.bottom - offset.top;\n const right = rect.right - offset.left;\n const top = rect.top - offset.top;\n const left = rect.left - offset.left;\n if (this.selectRect.y2 - top < 25) {\n const topScroll = 25 - (this.selectRect.y2 - top);\n const scroll = this.$scrollParent.scrollTop();\n this.$scrollParent.scrollTop(scroll - topScroll);\n } else if (bottom - this.selectRect.y2 < 40) {\n const bottomScroll = 40 - (bottom - this.selectRect.y2);\n const scroll = this.$scrollParent.scrollTop();\n this.$scrollParent.scrollTop(scroll + bottomScroll);\n }\n if (this.selectRect.x2 - left < 25) {\n const leftScroll = 25 - (this.selectRect.x2 - left);\n const scroll = this.$scrollParent.scrollLeft();\n this.$scrollParent.scrollLeft(scroll - leftScroll);\n } else if (right - this.selectRect.x2 < 40) {\n const rightScroll = 40 - (right - this.selectRect.x2);\n const scroll = this.$scrollParent.scrollLeft();\n this.$scrollParent.scrollLeft(scroll + rightScroll);\n }\n }\n\n public mouseup(e: MouseEvent) {\n if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0\n && !this.selectElement.hidden) {\n const rectBox = this.selectElement.getBoundingClientRect() as FcRectBox;\n this.selectElement.hidden = true;\n this.selectObjects(rectBox);\n }\n }\n\n private updateSelectRect() {\n const x3 = Math.min(this.selectRect.x1, this.selectRect.x2);\n const x4 = Math.max(this.selectRect.x1, this.selectRect.x2);\n const y3 = Math.min(this.selectRect.y1, this.selectRect.y2);\n const y4 = Math.max(this.selectRect.y1, this.selectRect.y2);\n this.selectElement.style.left = x3 + 'px';\n this.selectElement.style.top = y3 + 'px';\n this.selectElement.style.width = x4 - x3 + 'px';\n this.selectElement.style.height = y4 - y3 + 'px';\n }\n\n private selectObjects(rectBox: FcRectBox) {\n this.applyFunction(() => {\n this.modelService.selectAllInRect(rectBox);\n });\n }\n\n}\n\n","import {\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnInit\n} from '@angular/core';\nimport { FcCallbacks, FcEdge, FcModel, FcNode, FlowchartConstants, UserCallbacks, UserNodeCallbacks } from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\nimport { FcModelValidationService } from './modelvalidation.service';\nimport { FcNodeDraggingService } from './node-dragging.service';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { FcEdgeDraggingService } from './edge-dragging.service';\nimport { FcMouseOverService } from './mouseover.service';\nimport { FcRectangleSelectService } from './rectangleselect.service';\n\n@Component({\n selector: 'fc-canvas',\n templateUrl: './ngx-flowchart.component.html',\n styleUrls: ['./ngx-flowchart.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgxFlowchartComponent implements OnInit, DoCheck {\n\n @HostBinding('attr.class')\n get canvasClass(): string {\n return FlowchartConstants.canvasClass;\n }\n\n @Input()\n model: FcModel;\n\n @Input()\n selectedObjects: any[];\n\n @Input()\n edgeStyle: string;\n\n @Input()\n userCallbacks: UserCallbacks;\n\n @Input()\n automaticResize: boolean;\n\n @Input()\n dragAnimation: string;\n\n @Input()\n nodeWidth: number;\n\n @Input()\n nodeHeight: number;\n\n @Input()\n dropTargetId: string;\n\n callbacks: FcCallbacks;\n\n userNodeCallbacks: UserNodeCallbacks;\n\n modelService: FcModelService;\n nodeDraggingService: FcNodeDraggingService;\n edgeDraggingService: FcEdgeDraggingService;\n mouseoverService: FcMouseOverService;\n rectangleSelectService: FcRectangleSelectService;\n\n arrowDefId: string;\n arrowDefIdSelected: string;\n\n flowchartConstants = FlowchartConstants;\n\n private nodesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => {\n return item;\n });\n\n private edgesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => {\n return item;\n });\n\n constructor(private elementRef: ElementRef,\n private differs: IterableDiffers,\n private modelValidation: FcModelValidationService,\n public edgeDrawingService: FcEdgeDrawingService,\n private cd: ChangeDetectorRef,\n private zone: NgZone) {\n this.arrowDefId = 'arrow-' + Math.random();\n this.arrowDefIdSelected = this.arrowDefId + '-selected';\n }\n\n ngOnInit() {\n if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) {\n throw new Error('edgeStyle not supported.');\n }\n this.nodeHeight = this.nodeHeight || 200;\n this.nodeWidth = this.nodeWidth || 200;\n this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint;\n this.userCallbacks = this.userCallbacks || {};\n this.automaticResize = this.automaticResize || false;\n\n for (const key of Object.keys(this.userCallbacks)) {\n const callback = this.userCallbacks[key];\n if (typeof callback !== 'function' && key !== 'nodeCallbacks') {\n throw new Error('All callbacks should be functions.');\n }\n }\n\n this.userNodeCallbacks = this.userCallbacks.nodeCallbacks;\n\n const element = $(this.elementRef.nativeElement);\n\n this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects,\n this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved,\n this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg'));\n\n if (this.dropTargetId) {\n this.modelService.dropTargetId = this.dropTargetId;\n }\n\n const applyFunction = this.zone.run.bind(this.zone);\n\n this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction,\n this.automaticResize, this.dragAnimation);\n\n this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService,\n this.model, this.userCallbacks.isValidEdge || null, applyFunction,\n this.dragAnimation, this.edgeStyle);\n\n this.mouseoverService = new FcMouseOverService(applyFunction);\n\n this.rectangleSelectService = new FcRectangleSelectService(this.modelService,\n element[0].querySelector('#select-rectangle'), applyFunction);\n\n this.callbacks = {\n nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService),\n nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService),\n edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService),\n edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService),\n edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService),\n edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService),\n edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService),\n edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService),\n nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService),\n nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService),\n connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService),\n connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService),\n nodeClicked: (event, node) => {\n this.modelService.nodes.handleClicked(node, event.ctrlKey);\n event.stopPropagation();\n event.preventDefault();\n }\n };\n this.adjustCanvasSize(true);\n }\n\n ngDoCheck(): void {\n if (this.model) {\n const nodesChange = this.nodesDiffer.diff(this.model.nodes);\n const edgesChange = this.edgesDiffer.diff(this.model.edges);\n let nodesChanged = false;\n let edgesChanged = false;\n if (nodesChange !== null) {\n nodesChange.forEachAddedItem(() => {\n nodesChanged = true;\n });\n nodesChange.forEachRemovedItem(() => {\n nodesChanged = true;\n });\n }\n if (edgesChange !== null) {\n edgesChange.forEachAddedItem(() => {\n edgesChanged = true;\n });\n edgesChange.forEachRemovedItem(() => {\n edgesChanged = true;\n });\n }\n if (nodesChanged) {\n this.adjustCanvasSize(true);\n }\n if (nodesChanged || edgesChanged) {\n this.cd.detectChanges();\n }\n }\n }\n\n getEdgeDAttribute(edge: FcEdge): string {\n return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge),\n this.modelService.edges.destCoord(edge), this.edgeStyle);\n }\n\n public adjustCanvasSize(fit?: boolean) {\n let maxX = 0;\n let maxY = 0;\n const element = $(this.elementRef.nativeElement);\n this.model.nodes.forEach((node) => {\n maxX = Math.max(node.x + this.nodeWidth, maxX);\n maxY = Math.max(node.y + this.nodeHeight, maxY);\n });\n let width;\n let height;\n if (fit) {\n width = maxX;\n height = maxY;\n } else {\n width = Math.max(maxX, element.prop('offsetWidth'));\n height = Math.max(maxY, element.prop('offsetHeight'));\n }\n element.css('width', width + 'px');\n element.css('height', height + 'px');\n }\n\n canvasClick(event: MouseEvent) {}\n\n edgeMouseDown(event: MouseEvent, edge: FcEdge) {\n event.stopPropagation();\n }\n\n edgeClick(event: MouseEvent, edge: FcEdge) {\n this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey);\n event.stopPropagation();\n event.preventDefault();\n }\n\n edgeRemove(event: Event, edge: FcEdge) {\n this.modelService.edges.delete(edge);\n event.stopPropagation();\n event.preventDefault();\n }\n\n edgeEdit(event: Event, edge: FcEdge) {\n if (this.userCallbacks.edgeEdit) {\n this.userCallbacks.edgeEdit(event, edge);\n }\n }\n\n edgeDoubleClick(event: MouseEvent, edge: FcEdge) {\n if (this.userCallbacks.edgeDoubleClick) {\n this.userCallbacks.edgeDoubleClick(event, edge);\n }\n }\n\n edgeMouseOver(event: MouseEvent, edge: FcEdge) {\n if (this.userCallbacks.edgeMouseOver) {\n this.userCallbacks.edgeMouseOver(event, edge);\n }\n }\n\n edgeMouseEnter(event: MouseEvent, edge: FcEdge) {\n this.mouseoverService.edgeMouseEnter(event, edge);\n }\n\n edgeMouseLeave(event: MouseEvent, edge: FcEdge) {\n this.mouseoverService.edgeMouseLeave(event, edge);\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n this.nodeDraggingService.dragover(event);\n this.edgeDraggingService.dragover(event);\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n if (event.preventDefault) {\n event.preventDefault();\n }\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n this.nodeDraggingService.drop(event);\n }\n\n @HostListener('mousedown', ['$event'])\n mousedown(event: MouseEvent) {\n this.rectangleSelectService.mousedown(event);\n }\n\n @HostListener('mousemove', ['$event'])\n mousemove(event: MouseEvent) {\n this.rectangleSelectService.mousemove(event);\n }\n\n @HostListener('mouseup', ['$event'])\n mouseup(event: MouseEvent) {\n this.rectangleSelectService.mouseup(event);\n }\n\n}\n","import { Directive, ElementRef, HostListener, Input, OnInit } from '@angular/core';\nimport { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[fc-magnet]'\n})\nexport class FcMagnetDirective implements OnInit {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n connector: FcConnector;\n\n constructor(public elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.magnetClass);\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n return this.callbacks.edgeDragoverMagnet(event, this.connector);\n }\n\n @HostListener('dragleave', ['$event'])\n dragleave(event: DragEvent) {\n this.callbacks.edgeDragleaveMagnet(event);\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n return this.callbacks.edgeDrop(event, this.connector);\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n this.callbacks.edgeDragend(event);\n }\n\n}\n","import { Directive, ElementRef, HostListener, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[fc-connector]'\n})\nexport class FcConnectorDirective implements OnInit, OnChanges {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n connector: FcConnector;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n constructor(public elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.connectorClass);\n if (this.modelservice.isEditable()) {\n element.attr('draggable', 'true');\n this.updateConnectorClass();\n }\n this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n let updateConnector = false;\n for (const propName of Object.keys(changes)) {\n const change = changes[propName];\n if (!change.firstChange && change.currentValue !== change.previousValue) {\n if (propName === 'mouseOverConnector') {\n updateConnector = true;\n }\n }\n }\n if (updateConnector && this.modelservice.isEditable()) {\n this.updateConnectorClass();\n }\n }\n\n private updateConnectorClass() {\n const element = $(this.elementRef.nativeElement);\n if (this.connector === this.mouseOverConnector) {\n element.addClass(FlowchartConstants.hoverClass);\n } else {\n element.removeClass(FlowchartConstants.hoverClass);\n }\n }\n\n @HostListener('dragover', ['$event'])\n dragover(event: DragEvent) {\n // Skip - conflict with magnet\n /* if (this.modelservice.isEditable()) {\n return this.callbacks.edgeDragoverConnector(event, this.connector);\n }*/\n }\n\n @HostListener('drop', ['$event'])\n drop(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n return this.callbacks.edgeDrop(event, this.connector);\n }\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.edgeDragend(event);\n }\n }\n\n @HostListener('dragstart', ['$event'])\n dragstart(event: DragEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.edgeDragstart(event, this.connector);\n }\n }\n\n @HostListener('mouseenter', ['$event'])\n mouseenter(event: MouseEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.connectorMouseEnter(event, this.connector);\n }\n }\n\n @HostListener('mouseleave', ['$event'])\n mouseleave(event: MouseEvent) {\n if (this.modelservice.isEditable()) {\n this.callbacks.connectorMouseLeave(event, this.connector);\n }\n }\n\n}\n","import {\n Component,\n ComponentFactoryResolver, Directive,\n ElementRef, HostBinding,\n HostListener,\n Inject,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport {\n FC_NODE_COMPONENT_CONFIG,\n FcCallbacks,\n FcConnector,\n FcNode,\n FcNodeComponentConfig,\n FlowchartConstants,\n UserNodeCallbacks\n} from './ngx-flowchart.models';\nimport { FcModelService } from './model.service';\n\n@Component({\n selector: 'fc-node',\n template: '',\n styleUrls: ['./node.component.scss']\n})\nexport class FcNodeContainerComponent implements OnInit, OnChanges {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n userNodeCallbacks: UserNodeCallbacks;\n\n @Input()\n node: FcNode;\n\n @Input()\n selected: boolean;\n\n @Input()\n edit: boolean;\n\n @Input()\n underMouse: boolean;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n dragging: boolean;\n\n @HostBinding('attr.id')\n get nodeId(): string {\n return this.node.id;\n }\n\n @HostBinding('style.top')\n get top(): string {\n return this.node.y + 'px';\n }\n\n @HostBinding('style.left')\n get left(): string {\n return this.node.x + 'px';\n }\n\n nodeComponent: FcNodeComponent;\n\n @ViewChild('nodeContent', {read: ViewContainerRef, static: true}) nodeContentContainer: ViewContainerRef;\n\n constructor(@Inject(FC_NODE_COMPONENT_CONFIG) private nodeComponentConfig: FcNodeComponentConfig,\n private elementRef: ElementRef,\n private componentFactoryResolver: ComponentFactoryResolver) {\n }\n\n ngOnInit(): void {\n if (!this.userNodeCallbacks) {\n this.userNodeCallbacks = {};\n }\n this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || (() => {});\n this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || (() => {});\n this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || (() => {});\n this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || (() => {});\n this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || (() => {});\n\n const element = $(this.elementRef.nativeElement);\n element.addClass(FlowchartConstants.nodeClass);\n if (!this.node.readonly) {\n element.attr('draggable', 'true');\n }\n this.updateNodeClass();\n this.modelservice.nodes.setHtmlElement(this.node.id, element[0]);\n this.nodeContentContainer.clear();\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType);\n const componentRef = this.nodeContentContainer.createComponent(componentFactory);\n this.nodeComponent = componentRef.instance;\n this.nodeComponent.callbacks = this.callbacks;\n this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks;\n this.nodeComponent.node = this.node;\n this.nodeComponent.modelservice = this.modelservice;\n this.updateNodeComponent();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n let updateNode = false;\n for (const propName of Object.keys(changes)) {\n const change = changes[propName];\n if (!change.firstChange && change.currentValue !== change.previousValue) {\n if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) {\n updateNode = true;\n }\n }\n }\n if (updateNode) {\n this.updateNodeClass();\n this.updateNodeComponent();\n }\n }\n\n private updateNodeClass() {\n const element = $(this.elementRef.nativeElement);\n this.toggleClass(element, FlowchartConstants.selectedClass, this.selected);\n this.toggleClass(element, FlowchartConstants.editClass, this.edit);\n this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse);\n this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging);\n }\n\n private updateNodeComponent() {\n this.nodeComponent.selected = this.selected;\n this.nodeComponent.edit = this.edit;\n this.nodeComponent.underMouse = this.underMouse;\n this.nodeComponent.mouseOverConnector = this.mouseOverConnector;\n this.nodeComponent.dragging = this.dragging;\n }\n\n private toggleClass(element: JQuery, clazz: string, set: boolean) {\n if (set) {\n element.addClass(clazz);\n } else {\n element.removeClass(clazz);\n }\n }\n\n @HostListener('mousedown', ['$event'])\n mousedown(event: MouseEvent) {\n event.stopPropagation();\n }\n\n @HostListener('dragstart', ['$event'])\n dragstart(event: DragEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeDragstart(event, this.node);\n }\n }\n\n @HostListener('dragend', ['$event'])\n dragend(event: DragEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeDragend(event);\n }\n }\n\n @HostListener('click', ['$event'])\n click(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeClicked(event, this.node);\n }\n }\n\n @HostListener('mouseover', ['$event'])\n mouseover(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeMouseOver(event, this.node);\n }\n }\n\n @HostListener('mouseout', ['$event'])\n mouseout(event: MouseEvent) {\n if (!this.node.readonly) {\n this.callbacks.nodeMouseOut(event, this.node);\n }\n }\n\n}\n\nexport abstract class FcNodeComponent implements OnInit {\n\n @Input()\n callbacks: FcCallbacks;\n\n @Input()\n userNodeCallbacks: UserNodeCallbacks;\n\n @Input()\n node: FcNode;\n\n @Input()\n selected: boolean;\n\n @Input()\n edit: boolean;\n\n @Input()\n underMouse: boolean;\n\n @Input()\n mouseOverConnector: FcConnector;\n\n @Input()\n modelservice: FcModelService;\n\n @Input()\n dragging: boolean;\n\n flowchartConstants = FlowchartConstants;\n\n ngOnInit(): void {\n }\n\n}\n","import { Component } from '@angular/core';\nimport { FcNodeComponent } from './node.component';\n\n@Component({\n selector: 'fc-default-node',\n templateUrl: './default-node.component.html',\n styleUrls: ['./default-node.component.scss']\n})\nexport class DefaultFcNodeComponent extends FcNodeComponent {\n\n constructor() {\n super();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { NgxFlowchartComponent } from './ngx-flowchart.component';\nimport { FcModelValidationService } from './modelvalidation.service';\nimport { FcEdgeDrawingService } from './edge-drawing.service';\nimport { CommonModule } from '@angular/common';\nimport { FcMagnetDirective } from './magnet.directive';\nimport { FcConnectorDirective } from './connector.directive';\nimport { FcNodeContainerComponent } from './node.component';\nimport { FC_NODE_COMPONENT_CONFIG } from './ngx-flowchart.models';\nimport { DefaultFcNodeComponent } from './default-node.component';\n\n@NgModule({\n entryComponents: [\n DefaultFcNodeComponent\n ],\n declarations: [NgxFlowchartComponent,\n FcMagnetDirective,\n FcConnectorDirective,\n FcNodeContainerComponent,\n DefaultFcNodeComponent],\n providers: [\n FcModelValidationService,\n FcEdgeDrawingService,\n {\n provide: FC_NODE_COMPONENT_CONFIG,\n useValue: {\n nodeComponentType: DefaultFcNodeComponent\n }\n }\n ],\n imports: [\n CommonModule\n ],\n exports: [NgxFlowchartComponent,\n FcMagnetDirective,\n FcConnectorDirective,\n DefaultFcNodeComponent]\n})\nexport class NgxFlowchartModule { }\n"],"names":["tslib_1.__extends","tslib_1.__values"],"mappings":";;;;;;;;;;AAIA,IAAa,wBAAwB,GAAG,IAAI,cAAc,CAAwB,0BAA0B,CAAC;;;;AAE7G,oCAEC;;;IADC,kDAAyC;;;IAGrC,UAAU,GAAG,IAAI;;IACjB,iBAAiB,GAAG,eAAe;;IACnC,kBAAkB,GAAG,gBAAgB;;AAE3C,IAAa,kBAAkB,GAAG;IAChC,UAAU,YAAA;IACV,iBAAiB,mBAAA;IACjB,kBAAkB,oBA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C3C,4DAA0D;;;;;AAiHxE;IAAA;QA6BE,uBAAkB,GAAG,kBAAkB,CAAC;KAKzC;;;;IAHC,kCAAQ;;;IAAR;KACC;;4BA9BA,KAAK;oCAGL,KAAK;uBAGL,KAAK;2BAGL,KAAK;uBAGL,KAAK;6BAGL,KAAK;qCAGL,KAAK;+BAGL,KAAK;2BAGL,KAAK;;IAQR,sBAAC;CAlCD,IAkCC;;;IAhCC,oCACuB;;IAEvB,4CACqC;;IAErC,+BACa;;IAEb,mCACkB;;IAElB,+BACc;;IAEd,qCACoB;;IAEpB,6CACgC;;IAEhC,uCAC6B;;IAE7B,mCACkB;;IAElB,6CAAwC;;;;;;;;ICrNED,0CAAe;IAEzD;eACE,iBAAO;KACR;;gBATF,SAAS,SAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,8hDAA4C;;iBAE7C;;;;IAOD,6BAAC;CAAA,CAN2C,eAAe;;;;;;ACR3D,WAyBgB;IACR,iBAAiB,EAAE,sBAAsB;CAC1C;AAhBP;IAAA;KA2BmC;;gBA3BlC,QAAQ,SAAC;oBACR,eAAe,EAAE;wBACf,sBAAsB;qBACvB;oBACD,YAAY,EAAE,CAAC,qBAAqB;wBAClC,iBAAiB;wBACjB,oBAAoB;wBACpB,wBAAwB;wBACxB,sBAAsB,CAAC;oBACzB,SAAS,EAAE;wBACT,wBAAwB;wBACxB,oBAAoB;wBACpB;4BACE,OAAO,EAAE,wBAAwB;4BACjC,QAAQ,MAEP;yBACF;qBACF;oBACD,OAAO,EAAE;wBACP,YAAY;qBACb;oBACD,OAAO,EAAE,CAAC,qBAAqB;wBAC7B,iBAAiB;wBACjB,oBAAoB;wBACpB,sBAAsB,CAAC;iBAC1B;;IACiC,yBAAC;CA3BnC;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/ngx-flowchart/lib/connector.directive.d.ts b/dist/ngx-flowchart/lib/connector.directive.d.ts new file mode 100644 index 0000000..951b76c --- /dev/null +++ b/dist/ngx-flowchart/lib/connector.directive.d.ts @@ -0,0 +1,20 @@ +import { ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core'; +import { FcCallbacks, FcConnector } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +export declare class FcConnectorDirective implements OnInit, OnChanges { + elementRef: ElementRef; + callbacks: FcCallbacks; + modelservice: FcModelService; + connector: FcConnector; + mouseOverConnector: FcConnector; + constructor(elementRef: ElementRef); + ngOnInit(): void; + ngOnChanges(changes: SimpleChanges): void; + private updateConnectorClass; + dragover(event: DragEvent): void; + drop(event: DragEvent): boolean; + dragend(event: DragEvent): void; + dragstart(event: DragEvent): void; + mouseenter(event: MouseEvent): void; + mouseleave(event: MouseEvent): void; +} diff --git a/dist/ngx-flowchart/lib/default-node.component.d.ts b/dist/ngx-flowchart/lib/default-node.component.d.ts new file mode 100644 index 0000000..1f380db --- /dev/null +++ b/dist/ngx-flowchart/lib/default-node.component.d.ts @@ -0,0 +1,4 @@ +import { FcNodeComponent } from './node.component'; +export declare class DefaultFcNodeComponent extends FcNodeComponent { + constructor(); +} diff --git a/dist/ngx-flowchart/lib/edge-dragging.service.d.ts b/dist/ngx-flowchart/lib/edge-dragging.service.d.ts new file mode 100644 index 0000000..565785f --- /dev/null +++ b/dist/ngx-flowchart/lib/edge-dragging.service.d.ts @@ -0,0 +1,40 @@ +/// +import { FcModelService } from './model.service'; +import { FcConnector, FcCoords, FcEdge, FcModel } from './ngx-flowchart.models'; +import { FcEdgeDrawingService } from './edge-drawing.service'; +import { FcModelValidationService } from './modelvalidation.service'; +export declare class FcEdgeDraggingService { + edgeDragging: EdgeDragging; + private draggedEdgeSource; + private dragOffset; + private destinationHtmlElement; + private oldDisplayStyle; + private readonly modelValidation; + private readonly edgeDrawingService; + private readonly modelService; + private readonly model; + private readonly isValidEdgeCallback; + private readonly applyFunction; + private readonly dragAnimation; + private readonly edgeStyle; + constructor(modelValidation: FcModelValidationService, edgeDrawingService: FcEdgeDrawingService, modelService: FcModelService, model: FcModel, isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean, applyFunction: (fn: (...args: any[]) => T) => T, dragAnimation: string, edgeStyle: string); + dragstart(event: DragEvent, connector: FcConnector): void; + dragover(event: DragEvent): void; + dragoverConnector(event: DragEvent, connector: FcConnector): boolean; + dragleaveMagnet(event: DragEvent): void; + dragoverMagnet(event: DragEvent, connector: FcConnector): boolean; + dragend(event: DragEvent): void; + drop(event: DragEvent, targetConnector: FcConnector): boolean; +} +export interface EdgeDragging { + isDragging: boolean; + shadowDragStarted: boolean; + dragPoint1: FcCoords; + dragPoint2: FcCoords; + dragLabel?: string; + prevEdge?: FcEdge; + magnetActive?: boolean; + gElement?: JQuery; + pathElement?: JQuery; + circleElement?: JQuery; +} diff --git a/dist/ngx-flowchart/lib/edge-drawing.service.d.ts b/dist/ngx-flowchart/lib/edge-drawing.service.d.ts new file mode 100644 index 0000000..9863e7b --- /dev/null +++ b/dist/ngx-flowchart/lib/edge-drawing.service.d.ts @@ -0,0 +1,9 @@ +import { FcCoords } from './ngx-flowchart.models'; +export declare class FcEdgeDrawingService { + constructor(); + getEdgeDAttribute(pt1: FcCoords, pt2: FcCoords, style: string): string; + getEdgeCenter(pt1: FcCoords, pt2: FcCoords): FcCoords; + private computeEdgeTangentOffset; + private computeEdgeSourceTangent; + private computeEdgeDestinationTangent; +} diff --git a/dist/ngx-flowchart/lib/magnet.directive.d.ts b/dist/ngx-flowchart/lib/magnet.directive.d.ts new file mode 100644 index 0000000..f18993a --- /dev/null +++ b/dist/ngx-flowchart/lib/magnet.directive.d.ts @@ -0,0 +1,13 @@ +import { ElementRef, OnInit } from '@angular/core'; +import { FcCallbacks, FcConnector } from './ngx-flowchart.models'; +export declare class FcMagnetDirective implements OnInit { + elementRef: ElementRef; + callbacks: FcCallbacks; + connector: FcConnector; + constructor(elementRef: ElementRef); + ngOnInit(): void; + dragover(event: DragEvent): boolean; + dragleave(event: DragEvent): void; + drop(event: DragEvent): boolean; + dragend(event: DragEvent): void; +} diff --git a/dist/ngx-flowchart/lib/model.service.d.ts b/dist/ngx-flowchart/lib/model.service.d.ts new file mode 100644 index 0000000..2739600 --- /dev/null +++ b/dist/ngx-flowchart/lib/model.service.d.ts @@ -0,0 +1,89 @@ +import { FcModelValidationService } from './modelvalidation.service'; +import { FcConnector, FcCoords, FcEdge, FcItemInfo, FcModel, FcNode, FcRectBox } from './ngx-flowchart.models'; +import { Observable } from 'rxjs'; +import { ChangeDetectorRef } from '@angular/core'; +export declare class FcModelService { + modelValidation: FcModelValidationService; + model: FcModel; + cd: ChangeDetectorRef; + selectedObjects: any[]; + connectorsHtmlElements: HtmlElementMap; + nodesHtmlElements: HtmlElementMap; + canvasHtmlElement: HTMLElement; + dragImage: HTMLImageElement; + svgHtmlElement: SVGElement; + dropNode: (event: Event, node: FcNode) => void; + createEdge: (event: Event, edge: FcEdge) => Observable; + edgeAddedCallback: (edge: FcEdge) => void; + nodeRemovedCallback: (node: FcNode) => void; + edgeRemovedCallback: (edge: FcEdge) => void; + dropTargetId: string; + connectors: ConnectorsModel; + nodes: NodesModel; + edges: EdgesModel; + constructor(modelValidation: FcModelValidationService, model: FcModel, cd: ChangeDetectorRef, selectedObjects: any[], dropNode: (event: Event, node: FcNode) => void, createEdge: (event: Event, edge: FcEdge) => Observable, edgeAddedCallback: (edge: FcEdge) => void, nodeRemovedCallback: (node: FcNode) => void, edgeRemovedCallback: (edge: FcEdge) => void, canvasHtmlElement: HTMLElement, svgHtmlElement: SVGElement); + detectChanges(): void; + selectObject(object: any): void; + deselectObject(object: any): void; + toggleSelectedObject(object: any): void; + isSelectedObject(object: any): boolean; + selectAll(): void; + deselectAll(): void; + isEditObject(object: any): boolean; + private inRectBox; + getItemInfoAtPoint(x: number, y: number): FcItemInfo; + getNodeAtPoint(x: number, y: number): FcNode; + getEdgeAtPoint(x: number, y: number): FcEdge; + selectAllInRect(rectBox: FcRectBox): void; + deleteSelected(): void; + isEditable(): boolean; + isDropSource(): boolean; + getDragImage(): HTMLImageElement; + registerCallbacks(edgeAddedCallback: (edge: FcEdge) => void, nodeRemovedCallback: (node: FcNode) => void, edgeRemovedCallback: (edge: FcEdge) => void): void; +} +interface HtmlElementMap { + [id: string]: HTMLElement; +} +declare abstract class AbstractFcModel { + modelService: FcModelService; + protected constructor(modelService: FcModelService); + select(object: T): void; + deselect(object: T): void; + toggleSelected(object: T): void; + isSelected(object: T): boolean; + isEdit(object: T): boolean; +} +declare class ConnectorsModel extends AbstractFcModel { + constructor(modelService: FcModelService); + getConnector(connectorId: string): FcConnector; + getHtmlElement(connectorId: string): HTMLElement; + setHtmlElement(connectorId: string, element: HTMLElement): void; + private _getCoords; + getCoords(connectorId: string): FcCoords; + getCenteredCoord(connectorId: string): FcCoords; +} +declare class NodesModel extends AbstractFcModel { + constructor(modelService: FcModelService); + getConnectorsByType(node: FcNode, type: string): Array; + private _addConnector; + delete(node: FcNode): void; + getSelectedNodes(): Array; + handleClicked(node: FcNode, ctrlKey?: boolean): void; + private _addNode; + getConnectorIds(node: FcNode): Array; + getNodeByConnectorId(connectorId: string): FcNode; + getHtmlElement(nodeId: string): HTMLElement; + setHtmlElement(nodeId: string, element: HTMLElement): void; +} +declare class EdgesModel extends AbstractFcModel { + constructor(modelService: FcModelService); + ready(edge: FcEdge): boolean; + sourceCoord(edge: FcEdge): FcCoords; + destCoord(edge: FcEdge): FcCoords; + delete(edge: FcEdge): void; + getSelectedEdges(): Array; + handleEdgeMouseClick(edge: FcEdge, ctrlKey?: boolean): void; + putEdge(edge: FcEdge): void; + _addEdge(event: Event, sourceConnector: FcConnector, destConnector: FcConnector, label: string): void; +} +export {}; diff --git a/dist/ngx-flowchart/lib/modelvalidation.service.d.ts b/dist/ngx-flowchart/lib/modelvalidation.service.d.ts new file mode 100644 index 0000000..7e86dde --- /dev/null +++ b/dist/ngx-flowchart/lib/modelvalidation.service.d.ts @@ -0,0 +1,12 @@ +import { FcConnector, FcEdge, FcModel, FcNode } from './ngx-flowchart.models'; +export declare class FcModelValidationService { + constructor(); + validateModel(model: FcModel): FcModel; + validateNodes(nodes: Array): Array; + validateNode(node: FcNode): FcNode; + private _validateEdges; + validateEdges(edges: Array, nodes: Array): Array; + private _validateEdge; + validateEdge(edge: FcEdge, nodes: Array): FcEdge; + validateConnector(connector: FcConnector): FcConnector; +} diff --git a/dist/ngx-flowchart/lib/mouseover.service.d.ts b/dist/ngx-flowchart/lib/mouseover.service.d.ts new file mode 100644 index 0000000..6715aee --- /dev/null +++ b/dist/ngx-flowchart/lib/mouseover.service.d.ts @@ -0,0 +1,17 @@ +import { FcConnector, FcEdge, FcNode } from './ngx-flowchart.models'; +export declare class FcMouseOverService { + mouseoverscope: MouseOverScope; + private readonly applyFunction; + constructor(applyFunction: (fn: (...args: any[]) => T) => T); + nodeMouseOver(event: MouseEvent, node: FcNode): void; + nodeMouseOut(event: MouseEvent, node: FcNode): void; + connectorMouseEnter(event: MouseEvent, connector: FcConnector): void; + connectorMouseLeave(event: MouseEvent, connector: FcConnector): void; + edgeMouseEnter(event: MouseEvent, edge: FcEdge): void; + edgeMouseLeave(event: MouseEvent, edge: FcEdge): void; +} +export interface MouseOverScope { + connector: FcConnector; + edge: FcEdge; + node: FcNode; +} diff --git a/dist/ngx-flowchart/lib/ngx-flowchart.component.d.ts b/dist/ngx-flowchart/lib/ngx-flowchart.component.d.ts index e03b8e9..49e273f 100644 --- a/dist/ngx-flowchart/lib/ngx-flowchart.component.d.ts +++ b/dist/ngx-flowchart/lib/ngx-flowchart.component.d.ts @@ -1,5 +1,82 @@ -import { OnInit } from '@angular/core'; -export declare class NgxFlowchartComponent implements OnInit { - constructor(); +import { ChangeDetectorRef, DoCheck, ElementRef, IterableDiffers, NgZone, OnInit } from '@angular/core'; +import { FcCallbacks, FcEdge, FcModel, UserCallbacks, UserNodeCallbacks } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +import { FcModelValidationService } from './modelvalidation.service'; +import { FcNodeDraggingService } from './node-dragging.service'; +import { FcEdgeDrawingService } from './edge-drawing.service'; +import { FcEdgeDraggingService } from './edge-dragging.service'; +import { FcMouseOverService } from './mouseover.service'; +import { FcRectangleSelectService } from './rectangleselect.service'; +export declare class NgxFlowchartComponent implements OnInit, DoCheck { + private elementRef; + private differs; + private modelValidation; + edgeDrawingService: FcEdgeDrawingService; + private cd; + private zone; + readonly canvasClass: string; + model: FcModel; + selectedObjects: any[]; + edgeStyle: string; + userCallbacks: UserCallbacks; + automaticResize: boolean; + dragAnimation: string; + nodeWidth: number; + nodeHeight: number; + dropTargetId: string; + callbacks: FcCallbacks; + userNodeCallbacks: UserNodeCallbacks; + modelService: FcModelService; + nodeDraggingService: FcNodeDraggingService; + edgeDraggingService: FcEdgeDraggingService; + mouseoverService: FcMouseOverService; + rectangleSelectService: FcRectangleSelectService; + arrowDefId: string; + arrowDefIdSelected: string; + flowchartConstants: { + htmlPrefix: string; + leftConnectorType: string; + rightConnectorType: string; + curvedStyle: string; + lineStyle: string; + dragAnimationRepaint: string; + dragAnimationShadow: string; + canvasClass: string; + selectedClass: string; + editClass: string; + activeClass: string; + hoverClass: string; + draggingClass: string; + edgeClass: string; + edgeLabelClass: string; + connectorClass: string; + magnetClass: string; + nodeClass: string; + nodeOverlayClass: string; + leftConnectorClass: string; + rightConnectorClass: string; + canvasResizeThreshold: number; + canvasResizeStep: number; + }; + private nodesDiffer; + private edgesDiffer; + constructor(elementRef: ElementRef, differs: IterableDiffers, modelValidation: FcModelValidationService, edgeDrawingService: FcEdgeDrawingService, cd: ChangeDetectorRef, zone: NgZone); ngOnInit(): void; + ngDoCheck(): void; + getEdgeDAttribute(edge: FcEdge): string; + adjustCanvasSize(fit?: boolean): void; + canvasClick(event: MouseEvent): void; + edgeMouseDown(event: MouseEvent, edge: FcEdge): void; + edgeClick(event: MouseEvent, edge: FcEdge): void; + edgeRemove(event: Event, edge: FcEdge): void; + edgeEdit(event: Event, edge: FcEdge): void; + edgeDoubleClick(event: MouseEvent, edge: FcEdge): void; + edgeMouseOver(event: MouseEvent, edge: FcEdge): void; + edgeMouseEnter(event: MouseEvent, edge: FcEdge): void; + edgeMouseLeave(event: MouseEvent, edge: FcEdge): void; + dragover(event: DragEvent): void; + drop(event: DragEvent): void; + mousedown(event: MouseEvent): void; + mousemove(event: MouseEvent): void; + mouseup(event: MouseEvent): void; } diff --git a/dist/ngx-flowchart/lib/ngx-flowchart.models.d.ts b/dist/ngx-flowchart/lib/ngx-flowchart.models.d.ts new file mode 100644 index 0000000..78c2ae7 --- /dev/null +++ b/dist/ngx-flowchart/lib/ngx-flowchart.models.d.ts @@ -0,0 +1,115 @@ +import { Observable } from 'rxjs'; +import { InjectionToken, Type } from '@angular/core'; +import { FcNodeComponent } from './node.component'; +export declare const FC_NODE_COMPONENT_CONFIG: InjectionToken; +export interface FcNodeComponentConfig { + nodeComponentType: Type; +} +export declare const FlowchartConstants: { + htmlPrefix: string; + leftConnectorType: string; + rightConnectorType: string; + curvedStyle: string; + lineStyle: string; + dragAnimationRepaint: string; + dragAnimationShadow: string; + canvasClass: string; + selectedClass: string; + editClass: string; + activeClass: string; + hoverClass: string; + draggingClass: string; + edgeClass: string; + edgeLabelClass: string; + connectorClass: string; + magnetClass: string; + nodeClass: string; + nodeOverlayClass: string; + leftConnectorClass: string; + rightConnectorClass: string; + canvasResizeThreshold: number; + canvasResizeStep: number; +}; +export interface FcCoords { + x?: number; + y?: number; +} +export interface FcOffset { + top: number; + left: number; +} +export interface FcRectBox { + top: number; + left: number; + right: number; + bottom: number; +} +export interface FcConnector { + id: string; + type: string; +} +export interface FcNode extends FcCoords { + id: string; + name: string; + connectors: Array; + readonly?: boolean; + [key: string]: any; +} +export interface FcEdge { + label?: string; + source?: string; + destination?: string; + active?: boolean; +} +export interface FcItemInfo { + node?: FcNode; + edge?: FcEdge; +} +export interface FcModel { + nodes: Array; + edges: Array; +} +export interface UserCallbacks { + dropNode?: (event: Event, node: FcNode) => void; + createEdge?: (event: Event, edge: FcEdge) => Observable; + edgeAdded?: (edge: FcEdge) => void; + nodeRemoved?: (node: FcNode) => void; + edgeRemoved?: (edge: FcEdge) => void; + edgeDoubleClick?: (event: MouseEvent, edge: FcEdge) => void; + edgeMouseOver?: (event: MouseEvent, edge: FcEdge) => void; + isValidEdge?: (source: FcConnector, destination: FcConnector) => boolean; + edgeEdit?: (event: Event, edge: FcEdge) => void; + nodeCallbacks?: UserNodeCallbacks; +} +export interface UserNodeCallbacks { + nodeEdit?: (event: MouseEvent, node: FcNode) => void; + doubleClick?: (event: MouseEvent, node: FcNode) => void; + mouseDown?: (event: MouseEvent, node: FcNode) => void; + mouseEnter?: (event: MouseEvent, node: FcNode) => void; + mouseLeave?: (event: MouseEvent, node: FcNode) => void; +} +export interface FcCallbacks { + nodeDragstart: (event: DragEvent, node: FcNode) => void; + nodeDragend: (event: DragEvent) => void; + edgeDragstart: (event: DragEvent, connector: FcConnector) => void; + edgeDragend: (event: DragEvent) => void; + edgeDrop: (event: DragEvent, targetConnector: FcConnector) => boolean; + edgeDragoverConnector: (event: DragEvent, connector: FcConnector) => boolean; + edgeDragoverMagnet: (event: DragEvent, connector: FcConnector) => boolean; + edgeDragleaveMagnet: (event: DragEvent) => void; + nodeMouseOver: (event: MouseEvent, node: FcNode) => void; + nodeMouseOut: (event: MouseEvent, node: FcNode) => void; + connectorMouseEnter: (event: MouseEvent, connector: FcConnector) => void; + connectorMouseLeave: (event: MouseEvent, connector: FcConnector) => void; + nodeClicked: (event: MouseEvent, node: FcNode) => void; +} +export interface FcAdjacentList { + [id: string]: { + incoming: number; + outgoing: Array; + }; +} +export declare class ModelvalidationError extends Error { + constructor(message: string); +} +export declare function fcTopSort(graph: FcModel): Array | null; diff --git a/dist/ngx-flowchart/lib/ngx-flowchart.service.d.ts b/dist/ngx-flowchart/lib/ngx-flowchart.service.d.ts deleted file mode 100644 index 1bb27f8..0000000 --- a/dist/ngx-flowchart/lib/ngx-flowchart.service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare class NgxFlowchartService { - constructor(); -} diff --git a/dist/ngx-flowchart/lib/node-dragging.service.d.ts b/dist/ngx-flowchart/lib/node-dragging.service.d.ts new file mode 100644 index 0000000..1aa9056 --- /dev/null +++ b/dist/ngx-flowchart/lib/node-dragging.service.d.ts @@ -0,0 +1,45 @@ +/// +import { FcModelService } from './model.service'; +import { FcNode } from './ngx-flowchart.models'; +export declare class FcNodeDraggingService { + nodeDraggingScope: NodeDraggingScope; + private dragOffsets; + private draggedElements; + private destinationHtmlElements; + private oldDisplayStyles; + private readonly modelService; + private readonly automaticResize; + private readonly dragAnimation; + private readonly applyFunction; + constructor(modelService: FcModelService, applyFunction: (fn: (...args: any[]) => T) => T, automaticResize: boolean, dragAnimation: string); + private getCoordinate; + private getXCoordinate; + private getYCoordinate; + private resizeCanvas; + isDraggingNode(node: FcNode): boolean; + dragstart(event: DragEvent, node: FcNode): void; + drop(event: DragEvent): boolean; + dragover(event: DragEvent): boolean; + dragend(event: DragEvent): void; +} +export interface NodeDraggingScope { + draggedNodes: Array; + shadowElements: Array>; + shadowDragStarted: boolean; + dropElement: HTMLElement; +} +export interface NodeDropElement extends HTMLElement { + offsetInfo?: { + offsetX: number; + offsetY: number; + }; +} +export interface NodeDropScope { + dropElement: NodeDropElement; +} +export interface DropNodeInfo { + node: FcNode; + dropTargetId: string; + offsetX: number; + offsetY: number; +} diff --git a/dist/ngx-flowchart/lib/node.component.d.ts b/dist/ngx-flowchart/lib/node.component.d.ts new file mode 100644 index 0000000..2e866f9 --- /dev/null +++ b/dist/ngx-flowchart/lib/node.component.d.ts @@ -0,0 +1,71 @@ +import { ComponentFactoryResolver, ElementRef, OnChanges, OnInit, SimpleChanges, ViewContainerRef } from '@angular/core'; +import { FcCallbacks, FcConnector, FcNode, FcNodeComponentConfig, UserNodeCallbacks } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +export declare class FcNodeContainerComponent implements OnInit, OnChanges { + private nodeComponentConfig; + private elementRef; + private componentFactoryResolver; + callbacks: FcCallbacks; + userNodeCallbacks: UserNodeCallbacks; + node: FcNode; + selected: boolean; + edit: boolean; + underMouse: boolean; + mouseOverConnector: FcConnector; + modelservice: FcModelService; + dragging: boolean; + readonly nodeId: string; + readonly top: string; + readonly left: string; + nodeComponent: FcNodeComponent; + nodeContentContainer: ViewContainerRef; + constructor(nodeComponentConfig: FcNodeComponentConfig, elementRef: ElementRef, componentFactoryResolver: ComponentFactoryResolver); + ngOnInit(): void; + ngOnChanges(changes: SimpleChanges): void; + private updateNodeClass; + private updateNodeComponent; + private toggleClass; + mousedown(event: MouseEvent): void; + dragstart(event: DragEvent): void; + dragend(event: DragEvent): void; + click(event: MouseEvent): void; + mouseover(event: MouseEvent): void; + mouseout(event: MouseEvent): void; +} +export declare abstract class FcNodeComponent implements OnInit { + callbacks: FcCallbacks; + userNodeCallbacks: UserNodeCallbacks; + node: FcNode; + selected: boolean; + edit: boolean; + underMouse: boolean; + mouseOverConnector: FcConnector; + modelservice: FcModelService; + dragging: boolean; + flowchartConstants: { + htmlPrefix: string; + leftConnectorType: string; + rightConnectorType: string; + curvedStyle: string; + lineStyle: string; + dragAnimationRepaint: string; + dragAnimationShadow: string; + canvasClass: string; + selectedClass: string; + editClass: string; + activeClass: string; + hoverClass: string; + draggingClass: string; + edgeClass: string; + edgeLabelClass: string; + connectorClass: string; + magnetClass: string; + nodeClass: string; + nodeOverlayClass: string; + leftConnectorClass: string; + rightConnectorClass: string; + canvasResizeThreshold: number; + canvasResizeStep: number; + }; + ngOnInit(): void; +} diff --git a/dist/ngx-flowchart/lib/rectangleselect.service.d.ts b/dist/ngx-flowchart/lib/rectangleselect.service.d.ts new file mode 100644 index 0000000..98e2736 --- /dev/null +++ b/dist/ngx-flowchart/lib/rectangleselect.service.d.ts @@ -0,0 +1,16 @@ +import { FcModelService } from './model.service'; +export declare class FcRectangleSelectService { + private readonly selectRect; + private readonly modelService; + private readonly selectElement; + private readonly $canvasElement; + private readonly $scrollParent; + private readonly applyFunction; + constructor(modelService: FcModelService, selectElement: HTMLElement, applyFunction: (fn: (...args: any[]) => T) => T); + mousedown(e: MouseEvent): void; + mousemove(e: MouseEvent): void; + private updateScroll; + mouseup(e: MouseEvent): void; + private updateSelectRect; + private selectObjects; +} diff --git a/dist/ngx-flowchart/lib/scrollparent.d.ts b/dist/ngx-flowchart/lib/scrollparent.d.ts new file mode 100644 index 0000000..6d3e0cd --- /dev/null +++ b/dist/ngx-flowchart/lib/scrollparent.d.ts @@ -0,0 +1,2 @@ +declare const scrollparent: (node: HTMLElement) => HTMLElement; +export default scrollparent; diff --git a/dist/ngx-flowchart/ngx-flowchart.d.ts b/dist/ngx-flowchart/ngx-flowchart.d.ts index e5daacf..730cfce 100644 --- a/dist/ngx-flowchart/ngx-flowchart.d.ts +++ b/dist/ngx-flowchart/ngx-flowchart.d.ts @@ -2,3 +2,9 @@ * Generated bundle index. Do not edit. */ export * from './public-api'; +export { FcConnectorDirective as ɵf } from './lib/connector.directive'; +export { DefaultFcNodeComponent as ɵd } from './lib/default-node.component'; +export { FcEdgeDrawingService as ɵc } from './lib/edge-drawing.service'; +export { FcMagnetDirective as ɵe } from './lib/magnet.directive'; +export { FcModelValidationService as ɵb } from './lib/modelvalidation.service'; +export { FcNodeContainerComponent as ɵa } from './lib/node.component'; diff --git a/dist/ngx-flowchart/ngx-flowchart.metadata.json b/dist/ngx-flowchart/ngx-flowchart.metadata.json index 89ab0de..a58cd95 100644 --- a/dist/ngx-flowchart/ngx-flowchart.metadata.json +++ b/dist/ngx-flowchart/ngx-flowchart.metadata.json @@ -1 +1 @@ -{"__symbolic":"module","version":4,"metadata":{"NgxFlowchartService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"NgxFlowchartComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"fc-canvas","template":"\n

\n ngx-flowchart works!\n

\n ","styles":[]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"NgxFlowchartModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgxFlowchartComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"NgxFlowchartComponent"}]}]}],"members":{}}},"origins":{"NgxFlowchartService":"./lib/ngx-flowchart.service","NgxFlowchartComponent":"./lib/ngx-flowchart.component","NgxFlowchartModule":"./lib/ngx-flowchart.module"},"importAs":"ngx-flowchart"} \ No newline at end of file +{"__symbolic":"module","version":4,"metadata":{"NgxFlowchartComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":22,"character":1},"arguments":[{"selector":"fc-canvas","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":26,"character":19},"member":"OnPush"},"template":"
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {{edgeDraggingService.edgeDragging.dragLabel}}\n
\n
\n \n
\n
\n \n
\n
\n ×\n
\n {{edge.label}}\n
\n
\n \n\n","styles":[":host{display:block;position:relative;width:100%;height:100%;background-size:25px 25px;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.1) 1px,transparent 1px);background-color:transparent;min-width:100%;min-height:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-canvas-container{display:block;position:relative;width:100%;height:100%}:host .fc-canvas-container svg.fc-canvas-svg{display:block;position:relative;width:100%;height:100%}:host .fc-edge{stroke:gray;stroke-width:4;transition:stroke-width .2s;fill:transparent}:host .fc-edge.fc-hover{stroke:gray;stroke-width:6;fill:transparent}:host .fc-edge.fc-selected{stroke:red;stroke-width:4;fill:transparent}:host .fc-edge.fc-active{-webkit-animation:3s linear infinite dash;animation:3s linear infinite dash;stroke-dasharray:20}:host .fc-edge.fc-dragging{pointer-events:none}:host .fc-arrow-marker polygon{stroke:gray;fill:gray}:host .fc-arrow-marker-selected polygon{stroke:red;fill:red}:host .edge-endpoint{fill:gray}:host .fc-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .fc-edge-label{position:absolute;opacity:.8;transition:transform .2s;transform-origin:bottom left;margin:0 auto}:host .fc-edge-label .fc-edge-label-text{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;text-align:center;font-size:16px}:host .fc-edge-label .fc-edge-label-text span{cursor:default;border:solid #ff3d00;border-radius:10px;color:#ff3d00;background-color:#fff;padding:3px 5px}:host .fc-edge-label .fc-nodeedit{top:-30px;right:14px}:host .fc-edge-label .fc-nodedelete{top:-30px;right:-13px}:host .fc-edge-label.fc-hover{transform:scale(1.25)}:host .fc-edge-label.fc-edit .fc-edge-label-text span,:host .fc-edge-label.fc-selected .fc-edge-label-text span{border:solid red;color:#fff;font-weight:600;background-color:red}:host .fc-select-rectangle{border:2px dashed #5262ff;position:absolute;background:rgba(20,125,255,.1);z-index:2}@-webkit-keyframes dash{from{stroke-dashoffset:500}}@keyframes dash{from{stroke-dashoffset:500}}:host ::ng-deep .fc-nodeedit{display:none;font-size:15px}:host ::ng-deep .fc-nodedelete{display:none;font-size:18px}:host ::ng-deep .fc-edit .fc-nodedelete,:host ::ng-deep .fc-edit .fc-nodeedit{display:block;position:absolute;border:2px solid #eee;border-radius:50%;font-weight:600;line-height:20px;height:20px;padding-top:2px;width:22px;background:#494949;color:#fff;text-align:center;vertical-align:bottom;cursor:pointer}:host ::ng-deep .fc-edit .fc-nodeedit{top:-24px;right:16px}:host ::ng-deep .fc-edit .fc-nodedelete{top:-24px;right:-13px}"]}]}],"members":{"canvasClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":30,"character":3},"arguments":["attr.class"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"selectedObjects":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"edgeStyle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"userCallbacks":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"automaticResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}}]}],"dragAnimation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"nodeWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":3}}]}],"nodeHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":56,"character":3}}]}],"dropTargetId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":59,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":85,"character":45,"context":{"typeName":"HTMLElement"},"module":"./lib/ngx-flowchart.component"}]},{"__symbolic":"reference","module":"@angular/core","name":"IterableDiffers","line":86,"character":31},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵc"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":89,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":90,"character":28}]}],"ngOnInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}],"getEdgeDAttribute":[{"__symbolic":"method"}],"adjustCanvasSize":[{"__symbolic":"method"}],"canvasClick":[{"__symbolic":"method"}],"edgeMouseDown":[{"__symbolic":"method"}],"edgeClick":[{"__symbolic":"method"}],"edgeRemove":[{"__symbolic":"method"}],"edgeEdit":[{"__symbolic":"method"}],"edgeDoubleClick":[{"__symbolic":"method"}],"edgeMouseOver":[{"__symbolic":"method"}],"edgeMouseEnter":[{"__symbolic":"method"}],"edgeMouseLeave":[{"__symbolic":"method"}],"dragover":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":261,"character":3},"arguments":["dragover",["$event"]]}]}],"drop":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":267,"character":3},"arguments":["drop",["$event"]]}]}],"mousedown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":278,"character":3},"arguments":["mousedown",["$event"]]}]}],"mousemove":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":283,"character":3},"arguments":["mousemove",["$event"]]}]}],"mouseup":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":288,"character":3},"arguments":["mouseup",["$event"]]}]}]}},"NgxFlowchartModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{"entryComponents":[{"__symbolic":"reference","name":"ɵd"}],"declarations":[{"__symbolic":"reference","name":"NgxFlowchartComponent"},{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵd"}],"providers":[{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵc"},{"provide":{"__symbolic":"reference","name":"FC_NODE_COMPONENT_CONFIG"},"useValue":{"nodeComponentType":{"__symbolic":"reference","name":"ɵd"}}}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":31,"character":4}],"exports":[{"__symbolic":"reference","name":"NgxFlowchartComponent"},{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"ɵd"}]}]}],"members":{}},"FC_NODE_COMPONENT_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":44},"arguments":["fc-node.component.config"]},"FcNodeComponentConfig":{"__symbolic":"interface"},"FlowchartConstants":{"htmlPrefix":"fc","leftConnectorType":"leftConnector","rightConnectorType":"rightConnector","curvedStyle":"curved","lineStyle":"line","dragAnimationRepaint":"repaint","dragAnimationShadow":"shadow","canvasClass":"fc-canvas","selectedClass":"fc-selected","editClass":"fc-edit","activeClass":"fc-active","hoverClass":"fc-hover","draggingClass":"fc-dragging","edgeClass":"fc-edge","edgeLabelClass":"fc-edge-label","connectorClass":"fc-connector","magnetClass":"fc-magnet","nodeClass":"fc-node","nodeOverlayClass":"fc-node-overlay","leftConnectorClass":"fc-leftConnectors","rightConnectorClass":"fc-rightConnectors","canvasResizeThreshold":200,"canvasResizeStep":200},"FcCoords":{"__symbolic":"interface"},"FcOffset":{"__symbolic":"interface"},"FcRectBox":{"__symbolic":"interface"},"FcConnector":{"__symbolic":"interface"},"FcNode":{"__symbolic":"interface"},"FcEdge":{"__symbolic":"interface"},"FcItemInfo":{"__symbolic":"interface"},"FcModel":{"__symbolic":"interface"},"UserCallbacks":{"__symbolic":"interface"},"UserNodeCallbacks":{"__symbolic":"interface"},"FcCallbacks":{"__symbolic":"interface"},"FcAdjacentList":{"__symbolic":"interface"},"ModelvalidationError":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"Error"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"}]}]}},"fcTopSort":{"__symbolic":"function"},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":24,"character":1},"arguments":[{"selector":"fc-node","template":"","styles":[":host{position:absolute;z-index:1}:host.fc-dragging{z-index:10}:host ::ng-deep .fc-leftConnectors,:host ::ng-deep .fc-rightConnectors{position:absolute;top:0;height:100%;display:flex;flex-direction:column;z-index:-10}:host ::ng-deep .fc-leftConnectors .fc-magnet,:host ::ng-deep .fc-rightConnectors .fc-magnet{align-items:center}:host ::ng-deep .fc-leftConnectors{left:-20px}:host ::ng-deep .fc-rightConnectors{right:-20px}:host ::ng-deep .fc-magnet{display:flex;flex-grow:1;height:60px;justify-content:center}:host ::ng-deep .fc-connector{width:18px;height:18px;border:10px solid transparent;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box;border-radius:50%;background-color:#f7a789;color:#fff;pointer-events:all}:host ::ng-deep .fc-connector.fc-hover{background-color:#000}"]}]}],"members":{"callbacks":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"userNodeCallbacks":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"node":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"edit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"underMouse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"mouseOverConnector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":3}}]}],"modelservice":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"dragging":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":3}}]}],"nodeId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":58,"character":3},"arguments":["attr.id"]}]}],"top":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":63,"character":3},"arguments":["style.top"]}]}],"left":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":68,"character":3},"arguments":["style.left"]}]}],"nodeContentContainer":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":75,"character":3},"arguments":["nodeContent",{"read":{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":75,"character":35},"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":77,"character":15},"arguments":[{"__symbolic":"reference","name":"FC_NODE_COMPONENT_CONFIG"}]}],null,null],"parameters":[{"__symbolic":"reference","name":"FcNodeComponentConfig"},{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":78,"character":45,"context":{"typeName":"HTMLElement"},"module":"./lib/node.component"}]},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":79,"character":48}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"updateNodeClass":[{"__symbolic":"method"}],"updateNodeComponent":[{"__symbolic":"method"}],"toggleClass":[{"__symbolic":"method"}],"mousedown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":150,"character":3},"arguments":["mousedown",["$event"]]}]}],"dragstart":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":155,"character":3},"arguments":["dragstart",["$event"]]}]}],"dragend":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":162,"character":3},"arguments":["dragend",["$event"]]}]}],"click":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":169,"character":3},"arguments":["click",["$event"]]}]}],"mouseover":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":176,"character":3},"arguments":["mouseover",["$event"]]}]}],"mouseout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":183,"character":3},"arguments":["mouseout",["$event"]]}]}]}},"FcNodeComponent":{"__symbolic":"class","members":{"callbacks":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":194,"character":3}}]}],"userNodeCallbacks":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":197,"character":3}}]}],"node":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":200,"character":3}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":203,"character":3}}]}],"edit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":206,"character":3}}]}],"underMouse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":209,"character":3}}]}],"mouseOverConnector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":212,"character":3}}]}],"modelservice":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":215,"character":3}}]}],"dragging":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":218,"character":3}}]}],"ngOnInit":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"validateModel":[{"__symbolic":"method"}],"validateNodes":[{"__symbolic":"method"}],"validateNode":[{"__symbolic":"method"}],"_validateEdges":[{"__symbolic":"method"}],"validateEdges":[{"__symbolic":"method"}],"_validateEdge":[{"__symbolic":"method"}],"validateEdge":[{"__symbolic":"method"}],"validateConnector":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"getEdgeDAttribute":[{"__symbolic":"method"}],"getEdgeCenter":[{"__symbolic":"method"}],"computeEdgeTangentOffset":[{"__symbolic":"method"}],"computeEdgeSourceTangent":[{"__symbolic":"method"}],"computeEdgeDestinationTangent":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"FcNodeComponent"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"fc-default-node","template":"\n
\n
\n

{{ node.name }}

\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n ×\n
\n\n","styles":[":host .fc-node-overlay{position:absolute;pointer-events:none;left:0;top:0;right:0;bottom:0;background-color:#000;opacity:0}:host :host-context(.fc-hover) .fc-node-overlay{opacity:.25;transition:opacity .2s}:host :host-context(.fc-selected) .fc-node-overlay{opacity:.25}:host .innerNode{display:flex;justify-content:center;align-items:center;min-width:100px;border-radius:5px;background-color:#f15b26;color:#fff;font-size:16px;pointer-events:none}:host .innerNode p{padding:0 15px;text-align:center}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]}},"ɵe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":3,"character":1},"arguments":[{"selector":"[fc-magnet]"}]}],"members":{"callbacks":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"connector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":15,"character":44,"context":{"typeName":"HTMLElement"},"module":"./lib/magnet.directive"}]}]}],"ngOnInit":[{"__symbolic":"method"}],"dragover":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":23,"character":3},"arguments":["dragover",["$event"]]}]}],"dragleave":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":28,"character":3},"arguments":["dragleave",["$event"]]}]}],"drop":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":33,"character":3},"arguments":["drop",["$event"]]}]}],"dragend":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":38,"character":3},"arguments":["dragend",["$event"]]}]}]}},"ɵf":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[fc-connector]"}]}],"members":{"callbacks":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"modelservice":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"connector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"mouseOverConnector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":22,"character":44,"context":{"typeName":"HTMLElement"},"module":"./lib/connector.directive"}]}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"updateConnectorClass":[{"__symbolic":"method"}],"dragover":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":59,"character":3},"arguments":["dragover",["$event"]]}]}],"drop":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":67,"character":3},"arguments":["drop",["$event"]]}]}],"dragend":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":74,"character":3},"arguments":["dragend",["$event"]]}]}],"dragstart":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":81,"character":3},"arguments":["dragstart",["$event"]]}]}],"mouseenter":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":88,"character":3},"arguments":["mouseenter",["$event"]]}]}],"mouseleave":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":95,"character":3},"arguments":["mouseleave",["$event"]]}]}]}}},"origins":{"NgxFlowchartComponent":"./lib/ngx-flowchart.component","NgxFlowchartModule":"./lib/ngx-flowchart.module","FC_NODE_COMPONENT_CONFIG":"./lib/ngx-flowchart.models","FcNodeComponentConfig":"./lib/ngx-flowchart.models","FlowchartConstants":"./lib/ngx-flowchart.models","FcCoords":"./lib/ngx-flowchart.models","FcOffset":"./lib/ngx-flowchart.models","FcRectBox":"./lib/ngx-flowchart.models","FcConnector":"./lib/ngx-flowchart.models","FcNode":"./lib/ngx-flowchart.models","FcEdge":"./lib/ngx-flowchart.models","FcItemInfo":"./lib/ngx-flowchart.models","FcModel":"./lib/ngx-flowchart.models","UserCallbacks":"./lib/ngx-flowchart.models","UserNodeCallbacks":"./lib/ngx-flowchart.models","FcCallbacks":"./lib/ngx-flowchart.models","FcAdjacentList":"./lib/ngx-flowchart.models","ModelvalidationError":"./lib/ngx-flowchart.models","fcTopSort":"./lib/ngx-flowchart.models","ɵa":"./lib/node.component","FcNodeComponent":"./lib/node.component","ɵb":"./lib/modelvalidation.service","ɵc":"./lib/edge-drawing.service","ɵd":"./lib/default-node.component","ɵe":"./lib/magnet.directive","ɵf":"./lib/connector.directive"},"importAs":"ngx-flowchart"} \ No newline at end of file diff --git a/dist/ngx-flowchart/package.json b/dist/ngx-flowchart/package.json index 02b2d4b..f3e07f1 100644 --- a/dist/ngx-flowchart/package.json +++ b/dist/ngx-flowchart/package.json @@ -3,7 +3,12 @@ "version": "0.0.1", "peerDependencies": { "@angular/common": "^8.0.3", - "@angular/core": "^8.0.3" + "@angular/core": "^8.0.3", + "jquery": "^3.4.1", + "typescript": "^3.1" + }, + "devDependencies": { + "@types/jquery": "^3.3.31" }, "main": "bundles/ngx-flowchart.umd.js", "module": "fesm5/ngx-flowchart.js", diff --git a/dist/ngx-flowchart/public-api.d.ts b/dist/ngx-flowchart/public-api.d.ts index 6ad14fe..07ae684 100644 --- a/dist/ngx-flowchart/public-api.d.ts +++ b/dist/ngx-flowchart/public-api.d.ts @@ -1,3 +1,4 @@ -export * from './lib/ngx-flowchart.service'; export * from './lib/ngx-flowchart.component'; export * from './lib/ngx-flowchart.module'; +export * from './lib/ngx-flowchart.models'; +export { FcNodeComponent } from './lib/node.component'; diff --git a/package-lock.json b/package-lock.json index d3b2d72..a51f365 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,95 +1,157 @@ { - "name": "ngx-flowchart", + "name": "ngx-flowchart-demo", "version": "0.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@angular-devkit/architect": { - "version": "0.800.6", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.800.6.tgz", - "integrity": "sha512-946ceRci/1yx09g8iRvULLoVihcB2RW9nhpCCMum4L9wheip8t4FWso3pd3JtPQGJV9dmsnwPzR9s12bncmj3g==", + "version": "0.802.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.802.2.tgz", + "integrity": "sha512-bMMo8BejHi3+n4xqewgcfat5+OYDmQQCLxWQ2W+qr7/u08vmTQTix3Q/wClp0nxgN0Zc9/1gSPaeudHLAlEizg==", "dev": true, "requires": { - "@angular-devkit/core": "8.0.6", + "@angular-devkit/core": "8.2.2", "rxjs": "6.4.0" + }, + "dependencies": { + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + } } }, "@angular-devkit/build-angular": { - "version": "0.800.6", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.800.6.tgz", - "integrity": "sha512-b6WPGN8PReRizeTe5sR3XS2sqTqfCeFIDXI4sPy3T3XdmO1dB/UP8trsHXifuNTNSVIID4X0hDwXuz36Lk+4Jw==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.800.6", - "@angular-devkit/build-optimizer": "0.800.6", - "@angular-devkit/build-webpack": "0.800.6", - "@angular-devkit/core": "8.0.6", - "@ngtools/webpack": "8.0.6", - "ajv": "6.10.0", - "autoprefixer": "9.5.1", - "browserslist": "4.5.5", - "caniuse-lite": "1.0.30000974", + "version": "0.802.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.802.2.tgz", + "integrity": "sha512-48WCSX5IpSbVe/cG9+KrcL6f93JwHicKfYLyrrGhywSENlBYVNLNfbJHz/AuaxjmsiCmiI9gLnRb/W5JoVxuMA==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.802.2", + "@angular-devkit/build-optimizer": "0.802.2", + "@angular-devkit/build-webpack": "0.802.2", + "@angular-devkit/core": "8.2.2", + "@ngtools/webpack": "8.2.2", + "ajv": "6.10.2", + "autoprefixer": "9.6.1", + "browserslist": "4.6.6", + "caniuse-lite": "1.0.30000986", "circular-dependency-plugin": "5.0.2", "clean-css": "4.2.1", - "copy-webpack-plugin": "5.0.2", - "core-js": "3.0.1", - "file-loader": "3.0.1", - "glob": "7.1.3", + "copy-webpack-plugin": "5.0.4", + "core-js": "3.1.4", + "file-loader": "4.1.0", + "glob": "7.1.4", "istanbul-instrumenter-loader": "3.0.1", "karma-source-map-support": "1.4.0", "less": "3.9.0", - "less-loader": "4.1.0", + "less-loader": "5.0.0", "license-webpack-plugin": "2.1.1", "loader-utils": "1.2.3", - "mini-css-extract-plugin": "0.6.0", + "mini-css-extract-plugin": "0.8.0", "minimatch": "3.0.4", - "open": "6.2.0", + "open": "6.4.0", "parse5": "4.0.0", - "postcss": "7.0.14", + "postcss": "7.0.17", "postcss-import": "12.0.1", "postcss-loader": "3.0.0", "raw-loader": "1.0.0", "rxjs": "6.4.0", - "sass": "1.19.0", + "sass": "1.22.7", "sass-loader": "7.1.0", - "semver": "6.0.0", + "semver": "6.3.0", "source-map-loader": "0.2.4", "source-map-support": "0.5.12", "speed-measure-webpack-plugin": "1.3.1", - "stats-webpack-plugin": "0.7.0", "style-loader": "0.23.1", "stylus": "0.54.5", "stylus-loader": "3.0.2", - "terser-webpack-plugin": "1.2.3", + "terser-webpack-plugin": "1.3.0", "tree-kill": "1.2.1", - "webpack": "4.30.0", - "webpack-dev-middleware": "3.6.2", - "webpack-dev-server": "3.3.1", + "webpack": "4.38.0", + "webpack-dev-middleware": "3.7.0", + "webpack-dev-server": "3.7.2", "webpack-merge": "4.2.1", "webpack-sources": "1.3.0", "webpack-subresource-integrity": "1.1.0-rc.6", "worker-plugin": "3.1.0" + }, + "dependencies": { + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + }, + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + } } }, "@angular-devkit/build-ng-packagr": { - "version": "0.800.6", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-ng-packagr/-/build-ng-packagr-0.800.6.tgz", - "integrity": "sha512-Ahu4Q9zNtgulD9d96vpKkqg5wGpeYpnq8VBZ/wKCA1M1DLNQAdGegDMfpPErzVKYBRc85ZItVh0yffyFIe6waQ==", + "version": "0.803.19", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-ng-packagr/-/build-ng-packagr-0.803.19.tgz", + "integrity": "sha512-8P7jq/ZvyKM9B5A9Ovt6P3fgo33DvoDIjsJmoXW7kgAbzz1NqRgsP9fwasSmgYo8G1CcqJDeGPHSkdsPRypRmg==", "dev": true, "requires": { - "@angular-devkit/architect": "0.800.6", + "@angular-devkit/architect": "0.803.19", "rxjs": "6.4.0" + }, + "dependencies": { + "@angular-devkit/architect": { + "version": "0.803.19", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.803.19.tgz", + "integrity": "sha512-ttWVQyks//9+EOeRbZbRll1hA3RVGzW2SYWy5swEBI4vKYaKDED5mehVZUP5NUtvJaMm5yLOiK4pg0l4l4VA6Q==", + "dev": true, + "requires": { + "@angular-devkit/core": "8.3.19", + "rxjs": "6.4.0" + } + }, + "@angular-devkit/core": { + "version": "8.3.19", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-8.3.19.tgz", + "integrity": "sha512-NTNxSpRB6zMlqsuWLHs2F6QuypIb/XUitMkJy2P7Ee3kZfCYvvH9cCkiQqkwEhKw6J01qKeXwOElmxnqmF291w==", + "dev": true, + "requires": { + "ajv": "6.10.2", + "fast-json-stable-stringify": "2.0.0", + "magic-string": "0.25.3", + "rxjs": "6.4.0", + "source-map": "0.7.3" + } + }, + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + } } }, "@angular-devkit/build-optimizer": { - "version": "0.800.6", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.800.6.tgz", - "integrity": "sha512-f8u9c5VA+bxbYREKX6EY8QsbIT8ziDRHlhJ1n6H2nUTaQi+THtbPfrDsf3S3aVACfkkY+LEGGl135XEPr5PoxA==", + "version": "0.802.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.802.2.tgz", + "integrity": "sha512-0QkTxMgCr2YiysdRVY64smtogDnWz0eyqhmUJbd9kEq1xxDDfuvs+6OT1Lk6xU7tcucVf33DKB9jK/3n3LZIpw==", "dev": true, "requires": { "loader-utils": "1.2.3", "source-map": "0.5.6", - "typescript": "3.4.4", + "tslib": "1.10.0", + "typescript": "3.5.3", "webpack-sources": "1.3.0" }, "dependencies": { @@ -98,83 +160,126 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", "dev": true - }, - "typescript": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.4.tgz", - "integrity": "sha512-xt5RsIRCEaf6+j9AyOBgvVuAec0i92rgCaS3S+UVf5Z/vF2Hvtsw08wtUTJqp4djwznoAgjSxeCcU4r+CcDBJA==", - "dev": true } } }, "@angular-devkit/build-webpack": { - "version": "0.800.6", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.800.6.tgz", - "integrity": "sha512-FwNGa99dxL9dACv/eLTP6u50tlPLG01yqp/JFAgxS0OmDkEMjSBLNgS8b8qhTo8XMhMsMWzb8yIUwV1PcSj6qg==", + "version": "0.802.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.802.2.tgz", + "integrity": "sha512-odsY7hkqUBsRgqTCcGXFuIBd6NJYSCduFHheoDpqwK0SIAlAZ6Q9pB6jv9J0FTwKUJBsVsHk+cXUuaeZhUQcIg==", "dev": true, "requires": { - "@angular-devkit/architect": "0.800.6", - "@angular-devkit/core": "8.0.6", + "@angular-devkit/architect": "0.802.2", + "@angular-devkit/core": "8.2.2", "rxjs": "6.4.0", "webpack-merge": "4.2.1" + }, + "dependencies": { + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + } } }, "@angular-devkit/core": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-8.0.6.tgz", - "integrity": "sha512-gbKEVsQuYqBJPzgaxEitvs0aN9NwmUHhTkum28mRyPbS3witay/q8+3ls48M2W+98Da/PQbfndxFY4OCa+qHEA==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-8.2.2.tgz", + "integrity": "sha512-qA1lK/OQhNptCxoEGbTryn6yeFS1F/e/EiUTwgU/j4DkBwPyYGE8iqWBd/cgI9AVqQaRSLLhVWXtDPxoNL0TKg==", "dev": true, "requires": { - "ajv": "6.10.0", + "ajv": "6.10.2", "fast-json-stable-stringify": "2.0.0", - "magic-string": "0.25.2", + "magic-string": "0.25.3", "rxjs": "6.4.0", "source-map": "0.7.3" + }, + "dependencies": { + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + } } }, "@angular-devkit/schematics": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-8.0.6.tgz", - "integrity": "sha512-FGPcVKxNvtdFB0A6oHyxtWeugL83nW+kPATlAimgh1hu7TCP94dDpflCV9o/lgZlH817xTYXrhToXJaMZSnDPw==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-8.2.2.tgz", + "integrity": "sha512-wAbP+IriWgTSLR4prezuFlLbxMZMGXiN0FNH2i/v8MfxNXCBiEvD4YtD/8s8YRsZs+IW7sp3bErSD/EIlS4DyQ==", "dev": true, "requires": { - "@angular-devkit/core": "8.0.6", + "@angular-devkit/core": "8.2.2", "rxjs": "6.4.0" + }, + "dependencies": { + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + } } }, "@angular/animations": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-8.0.3.tgz", - "integrity": "sha512-9zciJ4YRR0bodFSYgsgXdYMz8wKKyVjch7XZADGkWubXT8mGuwlpdPMlQ6n9Cwj8Ebu0u52WxMeQsX76K9RlYA==", + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-8.2.14.tgz", + "integrity": "sha512-3Vc9TnNpKdtvKIXcWDFINSsnwgEMiDmLzjceWg1iYKwpeZGQahUXPoesLwQazBMmxJzQiA4HOMj0TTXKZ+Jzkg==", "requires": { "tslib": "^1.9.0" } }, + "@angular/cdk": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-8.2.3.tgz", + "integrity": "sha512-ZwO5Sn720RA2YvBqud0JAHkZXjmjxM0yNzCO8RVtRE9i8Gl26Wk0j0nQeJkVm4zwv2QO8MwbKUKGTMt8evsokA==", + "requires": { + "parse5": "^5.0.0", + "tslib": "^1.7.1" + } + }, "@angular/cli": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-8.0.6.tgz", - "integrity": "sha512-COBpeoXyLt8FiOhsmoEnDfQcm0aTdUSUHsH3zNkVTcyxpRzZVspTDGzxhK0UsCpddXS/MMjJiXph6SJ1el3qaQ==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-8.2.2.tgz", + "integrity": "sha512-iQvNVbegNXvnuAo8Pal6hjwK8joGcaCTcIa3jh1GLZ9JT4fZk2p9D/8Kay8C0jLm2KytV3f4eSlPAuX5V6p/XQ==", "dev": true, "requires": { - "@angular-devkit/architect": "0.800.6", - "@angular-devkit/core": "8.0.6", - "@angular-devkit/schematics": "8.0.6", - "@schematics/angular": "8.0.6", - "@schematics/update": "0.800.6", + "@angular-devkit/architect": "0.802.2", + "@angular-devkit/core": "8.2.2", + "@angular-devkit/schematics": "8.2.2", + "@schematics/angular": "8.2.2", + "@schematics/update": "0.802.2", "@yarnpkg/lockfile": "1.1.0", + "ansi-colors": "4.1.1", "debug": "^4.1.1", "ini": "1.3.5", - "inquirer": "6.3.1", + "inquirer": "6.5.0", "npm-package-arg": "6.1.0", - "open": "6.2.0", - "pacote": "9.5.0", - "read-package-tree": "5.2.2", - "semver": "6.0.0", + "open": "6.4.0", + "pacote": "9.5.4", + "read-package-tree": "5.3.1", + "semver": "6.3.0", "symbol-observable": "1.2.0", "universal-analytics": "^0.4.20", "uuid": "^3.3.2" }, "dependencies": { + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -193,25 +298,25 @@ } }, "@angular/common": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-8.0.3.tgz", - "integrity": "sha512-2YLYGVUf9eJZcocRmD3/9UHj4qFHt2t4ftDWJmrFM9zo2PZF+G5O9fASO7qoBbwpx3KFZtQO4dprKl2dFugRjg==", + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-8.2.14.tgz", + "integrity": "sha512-Qmt+aX2quUW54kaNT7QH7WGXnFxr/cC2C6sf5SW5SdkZfDQSiz8IaItvieZfXVQUbBOQKFRJ7TlSkt0jI/yjvw==", "requires": { "tslib": "^1.9.0" } }, "@angular/compiler": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.0.3.tgz", - "integrity": "sha512-1/vF8D6l1O6IfWiDtaj6nC+B8CtkVtFgXgooDzLBO6XAkaCuJCnhKT1HnpWG5GtVsGaY9MGoTl1vE9ZMDbRQjg==", + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.2.14.tgz", + "integrity": "sha512-ABZO4E7eeFA1QyJ2trDezxeQM5ZFa1dXw1Mpl/+1vuXDKNjJgNyWYwKp/NwRkLmrsuV0yv4UDCDe4kJOGbPKnw==", "requires": { "tslib": "^1.9.0" } }, "@angular/compiler-cli": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-8.0.3.tgz", - "integrity": "sha512-6nckvBnnp1YnrxwCB8UKvhHAMcUa1WvGjbYMEqhgiBreiRT4ub+tKVPNzrRtQFPpcXtY1wlgOWqYHWhHRtcLlg==", + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-8.2.14.tgz", + "integrity": "sha512-XDrTyrlIZM+0NquVT+Kbg5bn48AaWFT+B3bAT288PENrTdkuxuF9AhjFRZj8jnMdmaE4O2rioEkXBtl6z3zptA==", "dev": true, "requires": { "canonical-path": "1.0.0", @@ -221,7 +326,6 @@ "magic-string": "^0.25.0", "minimist": "^1.2.0", "reflect-metadata": "^0.1.2", - "shelljs": "^0.8.1", "source-map": "^0.6.1", "tslib": "^1.9.0", "yargs": "13.1.0" @@ -233,1394 +337,1442 @@ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "require-main-filename": { + "anymatch": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" } }, - "yargs": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.1.0.tgz", - "integrity": "sha512-1UhJbXfzHiPqkfXNHYhiz79qM/kZqjTE8yGlEjZa85Q+3+OwcV6NRkV7XOV1W2Eom2bzILeUn55pQYffjVOLAg==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "cliui": "^4.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.0.0" + "is-extendable": "^0.1.0" } }, - "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" } - } - } - }, - "@angular/core": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-8.0.3.tgz", - "integrity": "sha512-IIxrtIPNuv2+HudER9J1nmPGiGJ4aRpeiFM9V4lSiSFv50RzuaoG60XqYIpUyuBdgvyKigcrfSbu9+x1vyN0hw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/forms": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-8.0.3.tgz", - "integrity": "sha512-22s82QDRQ72K4vMYuNh3NAN+da9uanwoydnfKlp2rb9dZAb2QVX9NN6gSoMrkSSr2O9KTP6pWiw6A3/MW8sGRA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/language-service": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-8.0.3.tgz", - "integrity": "sha512-04XojOo9FJgEQE/rZafnaJQxPEU+//TSzTgpGoIVzCSMx+joCY/ZSSwJZPWxiHlOE57W/zX02ZY+TwcM81oTdw==", - "dev": true - }, - "@angular/platform-browser": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-8.0.3.tgz", - "integrity": "sha512-ceAPP2Ijmk2sZ1rnOU/WNlE3DtT6K6ljpjO9oUfXKMoSMdWirJKAraT3m/BAzmYwMSXpPBxA7c3paZjiLL6t5A==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/platform-browser-dynamic": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.0.3.tgz", - "integrity": "sha512-ZjQjSYslSQAKzM4llvyMFxnSjFpbhT1U9FOdKwscPe475zAKX0087qsHrP2CRwkJRfwtdcmj9wMUQIPlzMpHLA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/router": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-8.0.3.tgz", - "integrity": "sha512-CU5pLTfQVUnTN93mdIKJrVjXiNldUkk30DPz4lpdxpZjYOqFGXeeSeQWmToHSofLPodNcAB4kkZ41VyXvlBu7w==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/generator": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.2.tgz", - "integrity": "sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ==", - "dev": true, - "requires": { - "@babel/types": "^7.7.2", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz", - "integrity": "sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.7.0", - "@babel/template": "^7.7.0", - "@babel/types": "^7.7.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz", - "integrity": "sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw==", - "dev": true, - "requires": { - "@babel/types": "^7.7.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz", - "integrity": "sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA==", - "dev": true, - "requires": { - "@babel/types": "^7.7.0" - } - }, - "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - } - } - }, - "@babel/parser": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.3.tgz", - "integrity": "sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A==", - "dev": true - }, - "@babel/template": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.0.tgz", - "integrity": "sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/types": "^7.7.0" - } - }, - "@babel/traverse": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.2.tgz", - "integrity": "sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.2", - "@babel/helper-function-name": "^7.7.0", - "@babel/helper-split-export-declaration": "^7.7.0", - "@babel/parser": "^7.7.2", - "@babel/types": "^7.7.2", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", "dev": true, + "optional": true, "requires": { - "ms": "^2.1.1" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.2.tgz", - "integrity": "sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - } - } - }, - "@ngtools/webpack": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-8.0.6.tgz", - "integrity": "sha512-ulu+5lLt4RjmcCXbmaGCjqjuOWt18DVek/Sq4HFE9E7zP+n7HercsU6h+9PrtaZThj9NB0B7A+afRB5aAQN/bQ==", - "dev": true, - "requires": { - "@angular-devkit/core": "8.0.6", - "enhanced-resolve": "4.1.0", - "rxjs": "6.4.0", - "tree-kill": "1.2.1", - "webpack-sources": "1.3.0" - } - }, - "@schematics/angular": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-8.0.6.tgz", - "integrity": "sha512-F0/MrbvrJQJIjt0GwEkmf9PZUX0xQlCjlDcH6U7yBni0/+R5Gd5g3G0f12fsSa2iAwpwrLkKpiQluj29eFituQ==", - "dev": true, - "requires": { - "@angular-devkit/core": "8.0.6", - "@angular-devkit/schematics": "8.0.6" - } - }, - "@schematics/update": { - "version": "0.800.6", - "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.800.6.tgz", - "integrity": "sha512-vrzGIJtMiwLWl96+aJXMYrPgPtktLRpY8ZiNnlLm3pMDmeg08uButRh/pQGt02HuO/apTNJ5g0bmG8K5wS4I5A==", - "dev": true, - "requires": { - "@angular-devkit/core": "8.0.6", - "@angular-devkit/schematics": "8.0.6", - "@yarnpkg/lockfile": "1.1.0", - "ini": "1.3.5", - "pacote": "9.5.0", - "rxjs": "6.4.0", - "semver": "6.0.0", - "semver-intersect": "1.4.0" - } - }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "requires": { - "defer-to-connect": "^1.0.1" - } - }, - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "@types/events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", - "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", - "dev": true - }, - "@types/glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", - "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", - "dev": true, - "requires": { - "@types/events": "*", - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/jasmine": { - "version": "3.3.16", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.3.16.tgz", - "integrity": "sha512-Nveep4zKGby8uIvG2AEUyYOwZS8uVeHK9TgbuWYSawUDDdIgfhCKz28QzamTo//Jk7Ztt9PO3f+vzlB6a4GV1Q==", - "dev": true - }, - "@types/jasminewd2": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.8.tgz", - "integrity": "sha512-d9p31r7Nxk0ZH0U39PTH0hiDlJ+qNVGjlt1ucOoTUptxb2v+Y5VMnsxfwN+i3hK4yQnqBi3FMmoMFcd1JHDxdg==", - "dev": true, - "requires": { - "@types/jasmine": "*" - } - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/node": { - "version": "8.9.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", - "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==", - "dev": true - }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", - "dev": true - }, - "@types/q": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", - "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=", - "dev": true - }, - "@types/resolve": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", - "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/selenium-webdriver": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz", - "integrity": "sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA==", - "dev": true - }, - "@types/source-list-map": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", - "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", - "dev": true - }, - "@types/webpack-sources": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.5.tgz", - "integrity": "sha512-zfvjpp7jiafSmrzJ2/i3LqOyTYTuJ7u1KOXlKgDlvsj9Rr0x7ZiYu5lZbXwobL7lmsRNtPXlBfmaUD8eU2Hu8w==", - "dev": true, - "requires": { - "@types/node": "*", - "@types/source-list-map": "*", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@webassemblyjs/ast": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", - "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", - "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", - "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", - "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", - "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.8.5" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", - "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", - "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "mamacro": "^0.0.3" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", - "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", - "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5" + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "yargs": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.1.0.tgz", + "integrity": "sha512-1UhJbXfzHiPqkfXNHYhiz79qM/kZqjTE8yGlEjZa85Q+3+OwcV6NRkV7XOV1W2Eom2bzILeUn55pQYffjVOLAg==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.0.0" + } + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } } }, - "@webassemblyjs/ieee754": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", - "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", - "dev": true, + "@angular/core": { + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-8.2.14.tgz", + "integrity": "sha512-zeePkigi+hPh3rN7yoNENG/YUBUsIvUXdxx+AZq+QPaFeKEA2FBSrKn36ojHFrdJUjKzl0lPMEiGC2b6a6bo6g==", "requires": { - "@xtuc/ieee754": "^1.2.0" + "tslib": "^1.9.0" } }, - "@webassemblyjs/leb128": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", - "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", - "dev": true, + "@angular/forms": { + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-8.2.14.tgz", + "integrity": "sha512-zhyKL3CFIqcyHJ/TQF/h1OZztK611a6rxuPHCrt/5Sn1SuBTJJQ1pPTkOYIDy6IrCrtyANc8qB6P17Mao71DNQ==", "requires": { - "@xtuc/long": "4.2.2" + "tslib": "^1.9.0" } }, - "@webassemblyjs/utf8": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", - "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", + "@angular/language-service": { + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-8.2.14.tgz", + "integrity": "sha512-7EhN9JJbAJcH2xCa+rIOmekjiEuB0qwPdHuD5qn/wwMfRzMZo+Db4hHbR9KHrLH6H82PTwYKye/LLpDaZqoHOA==", "dev": true }, - "@webassemblyjs/wasm-edit": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", - "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/helper-wasm-section": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-opt": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "@webassemblyjs/wast-printer": "1.8.5" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", - "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", - "dev": true, + "@angular/platform-browser": { + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-8.2.14.tgz", + "integrity": "sha512-MtJptptyKzsE37JZ2VB/tI4cvMrdAH+cT9pMBYZd66YSZfKjIj5s+AZo7z8ncoskQSB1o3HMfDjSK7QXGx1mLQ==", "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" + "tslib": "^1.9.0" } }, - "@webassemblyjs/wasm-opt": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", - "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", - "dev": true, + "@angular/platform-browser-dynamic": { + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.2.14.tgz", + "integrity": "sha512-mO2JPR5kLU/A3AQngy9+R/Q5gaF9csMStBQjwsCRI0wNtlItOIGL6+wTYpiTuh/ux+WVN1F2sLcEYU4Zf1ud9A==", "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5" + "tslib": "^1.9.0" } }, - "@webassemblyjs/wasm-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", - "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", - "dev": true, + "@angular/router": { + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-8.2.14.tgz", + "integrity": "sha512-DHA2BhODqV7F0g6ZKgFaZgbsqzHHWRcfWchCOrOVKu2rYiKUTwwHVLBgZAhrpNeinq2pWanVYSIhMr7wy+LfEA==", "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" + "tslib": "^1.9.0" } }, - "@webassemblyjs/wast-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", - "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/floating-point-hex-parser": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-code-frame": "1.8.5", - "@webassemblyjs/helper-fsm": "1.8.5", - "@xtuc/long": "4.2.2" + "@babel/highlight": "^7.0.0" } }, - "@webassemblyjs/wast-printer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", - "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", + "@babel/generator": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.2.tgz", + "integrity": "sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5", - "@xtuc/long": "4.2.2" + "@babel/types": "^7.7.2", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "@babel/helper-function-name": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz", + "integrity": "sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q==", "dev": true, "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" + "@babel/helper-get-function-arity": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0" } }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "@babel/helper-get-function-arity": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz", + "integrity": "sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw==", "dev": true, "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "@babel/types": "^7.7.0" } }, - "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", - "dev": true - }, - "adm-zip": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.13.tgz", - "integrity": "sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw==", - "dev": true - }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true - }, - "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "@babel/helper-split-export-declaration": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz", + "integrity": "sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA==", "dev": true, "requires": { - "es6-promisify": "^5.0.0" + "@babel/types": "^7.7.0" } }, - "agentkeepalive": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", "dev": true, "requires": { - "humanize-ms": "^1.2.1" + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + } } }, - "ajv": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", - "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "@babel/parser": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.3.tgz", + "integrity": "sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A==", + "dev": true + }, + "@babel/template": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.0.tgz", + "integrity": "sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/types": "^7.7.0" } }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true - }, - "ajv-keywords": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", - "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-align": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", - "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "@babel/traverse": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.2.tgz", + "integrity": "sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw==", "dev": true, "requires": { - "string-width": "^3.0.0" + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.7.2", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/types": "^7.7.2", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "ms": "^2.1.1" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "@babel/types": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.2.tgz", + "integrity": "sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } } }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "@ngtools/webpack": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-8.2.2.tgz", + "integrity": "sha512-ksPFlZbH0+Rj+0qTGmkbtU3GHLjQKF4nN047AZn8Q4QnPynKqItHskSlyVi0CMnKfJxOr2VTxlSkiKN+pUb0sA==", "dev": true, "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" + "@angular-devkit/core": "8.2.2", + "enhanced-resolve": "4.1.0", + "rxjs": "6.4.0", + "tree-kill": "1.2.1", + "webpack-sources": "1.3.0" }, "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "tslib": "^1.9.0" } } } }, - "app-root-path": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.2.1.tgz", - "integrity": "sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA==", - "dev": true - }, - "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "@schematics/angular": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-8.2.2.tgz", + "integrity": "sha512-0kZoGXwYRDLREwMYT+m0MyGenpPidLEulrWxgYWoLhsJAFKax7lTy2YYljtFTd+AlZYyB3PTpDsDip8uT743tA==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "@angular-devkit/core": "8.2.2", + "@angular-devkit/schematics": "8.2.2" } }, - "aria-query": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", - "integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=", + "@schematics/update": { + "version": "0.802.2", + "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.802.2.tgz", + "integrity": "sha512-ohwdxf0+uQ0aCTk27evs1l04rJ1nB3S95ihDr3rSQOl0WWizdto6TbXURtQ4PubORehjqvhrqqKGVp+QL2npGw==", "dev": true, "requires": { - "ast-types-flow": "0.0.7", - "commander": "^2.11.0" + "@angular-devkit/core": "8.2.2", + "@angular-devkit/schematics": "8.2.2", + "@yarnpkg/lockfile": "1.1.0", + "ini": "1.3.5", + "pacote": "9.5.4", + "rxjs": "6.4.0", + "semver": "6.3.0", + "semver-intersect": "1.4.0" + }, + "dependencies": { + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + } } }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", "dev": true }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", "dev": true, "requires": { - "array-uniq": "^1.0.1" + "defer-to-connect": "^1.0.1" } }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "@types/events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", "dev": true }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "@types/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", "dev": true, "requires": { - "safer-buffer": "~2.1.0" + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" } }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "@types/jasmine": { + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.3.16.tgz", + "integrity": "sha512-Nveep4zKGby8uIvG2AEUyYOwZS8uVeHK9TgbuWYSawUDDdIgfhCKz28QzamTo//Jk7Ztt9PO3f+vzlB6a4GV1Q==", + "dev": true + }, + "@types/jasminewd2": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.8.tgz", + "integrity": "sha512-d9p31r7Nxk0ZH0U39PTH0hiDlJ+qNVGjlt1ucOoTUptxb2v+Y5VMnsxfwN+i3hK4yQnqBi3FMmoMFcd1JHDxdg==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "@types/jasmine": "*" } }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "@types/jquery": { + "version": "3.3.31", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.31.tgz", + "integrity": "sha512-Lz4BAJihoFw5nRzKvg4nawXPzutkv7wmfQ5121avptaSIXlDNJCUuxZxX/G+9EVidZGuO0UBlk+YjKbwRKJigg==", "dev": true, "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } + "@types/sizzle": "*" } }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "@types/node": { + "version": "10.14.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.22.tgz", + "integrity": "sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw==", "dev": true }, - "ast-types-flow": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", "dev": true }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "@types/q": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", + "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", "dev": true, "requires": { - "lodash": "^4.17.14" + "@types/node": "*" } }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "@types/selenium-webdriver": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz", + "integrity": "sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA==", "dev": true }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "@types/sizzle": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", + "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==", "dev": true }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "@types/source-list-map": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", + "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", "dev": true }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true + "@types/webpack-sources": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.5.tgz", + "integrity": "sha512-zfvjpp7jiafSmrzJ2/i3LqOyTYTuJ7u1KOXlKgDlvsj9Rr0x7ZiYu5lZbXwobL7lmsRNtPXlBfmaUD8eU2Hu8w==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/source-list-map": "*", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } }, - "autoprefixer": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.5.1.tgz", - "integrity": "sha512-KJSzkStUl3wP0D5sdMlP82Q52JLy5+atf2MHAre48+ckWkXgixmfHyWmA77wFDy6jTHU6mIgXv6hAQ2mf1PjJQ==", + "@webassemblyjs/ast": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", + "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", "dev": true, "requires": { - "browserslist": "^4.5.4", - "caniuse-lite": "^1.0.30000957", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.14", - "postcss-value-parser": "^3.3.1" + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5" } }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", + "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", "dev": true }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "@webassemblyjs/helper-api-error": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", + "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", "dev": true }, - "axobject-query": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.0.2.tgz", - "integrity": "sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww==", + "@webassemblyjs/helper-buffer": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", + "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", + "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", "dev": true, "requires": { - "ast-types-flow": "0.0.7" + "@webassemblyjs/wast-printer": "1.8.5" } }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "@webassemblyjs/helper-fsm": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", + "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", + "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } + "@webassemblyjs/ast": "1.8.5", + "mamacro": "^0.0.3" } }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", + "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", + "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5" } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "@webassemblyjs/ieee754": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", + "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "@xtuc/ieee754": "^1.2.0" } }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "@webassemblyjs/leb128": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", + "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "core-js": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", - "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==", - "dev": true - } + "@xtuc/long": "4.2.2" } }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "@webassemblyjs/utf8": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", + "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", + "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/helper-wasm-section": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-opt": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "@webassemblyjs/wast-printer": "1.8.5" } }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "@webassemblyjs/wasm-gen": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", + "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" } }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "@webassemblyjs/wasm-opt": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", + "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5" } }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "@webassemblyjs/wasm-parser": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", + "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" + } }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "@webassemblyjs/wast-parser": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", + "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/floating-point-hex-parser": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-code-frame": "1.8.5", + "@webassemblyjs/helper-fsm": "1.8.5", + "@xtuc/long": "4.2.2" } }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "dev": true + "@webassemblyjs/wast-printer": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", + "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5", + "@xtuc/long": "4.2.2" + } }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", "dev": true }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", "dev": true }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dev": true, "requires": { - "tweetnacl": "^0.14.3" + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" } }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", "dev": true, "requires": { - "callsite": "1.0.0" + "mime-types": "~2.1.24", + "negotiator": "0.6.2" } }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "acorn": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", "dev": true }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "adm-zip": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.13.tgz", + "integrity": "sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw==", "dev": true }, - "blob": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", "dev": true }, - "blocking-proxy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", - "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", + "agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "dev": true, "requires": { - "minimist": "^1.2.0" + "es6-promisify": "^5.0.0" } }, - "bluebird": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", - "integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "agentkeepalive": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", + "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", "dev": true, "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - } + "humanize-ms": "^1.2.1" } }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", "dev": true, "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, - "boxen": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-3.2.0.tgz", - "integrity": "sha512-cU4J/+NodM3IHdSL2yN8bqYqnmlBTidDR4RC7nJs61ZmtGz8VZzM3HLQX0zY5mrSmPtR3xWwsq2jOUQqFZN8+A==", + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, + "ajv-keywords": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", "dev": true, "requires": { - "ansi-align": "^3.0.0", - "camelcase": "^5.3.1", - "chalk": "^2.4.2", - "cli-boxes": "^2.2.0", - "string-width": "^3.0.0", - "term-size": "^1.2.0", - "type-fest": "^0.3.0", - "widest-line": "^2.0.0" + "string-width": "^3.0.0" }, "dependencies": { "ansi-regex": { @@ -1648,2758 +1800,2837 @@ "requires": { "ansi-regex": "^4.1.0" } - }, - "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true } } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", "dev": true }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "color-convert": "^1.9.0" } }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "dev": true, "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "app-root-path": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.2.1.tgz", + "integrity": "sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA==", + "dev": true + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" + "default-require-extensions": "^2.0.0" } }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "arg": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz", + "integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" } }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "aria-query": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", + "integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=", "dev": true, "requires": { - "pako": "~1.0.5" + "ast-types-flow": "0.0.7", + "commander": "^2.11.0" } }, - "browserslist": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.5.tgz", - "integrity": "sha512-0QFO1r/2c792Ohkit5XI8Cm8pDtZxgNl2H6HU4mHrpYz7314pEYcsAVVatM0l/YmxPnEzh9VygXouj4gkFUTKA==", + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000960", - "electron-to-chromium": "^1.3.124", - "node-releases": "^1.1.14" + "array-uniq": "^1.0.1" } }, - "browserstack": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.5.3.tgz", - "integrity": "sha512-AO+mECXsW4QcqC9bxwM29O7qWa7bJT94uBFzeb5brylIQwawuEziwq20dPYbins95GlWzOawgyDNdjYAo32EKg==", + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arraybuffer.slice": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "dev": true, "requires": { - "https-proxy-agent": "^2.2.1" + "safer-buffer": "~2.1.0" } }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", "dev": true, "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } } }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, - "buffer-fill": { + "assign-symbols": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", "dev": true }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } }, - "buffer-xor": { + "async-each": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", "dev": true }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "autoprefixer": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.1.tgz", + "integrity": "sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw==", + "dev": true, + "requires": { + "browserslist": "^4.6.3", + "caniuse-lite": "^1.0.30000980", + "chalk": "^2.4.2", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^7.0.17", + "postcss-value-parser": "^4.0.0" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, - "cacache": { - "version": "11.3.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", - "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", + "axobject-query": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.0.2.tgz", + "integrity": "sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww==", + "dev": true, + "requires": { + "ast-types-flow": "0.0.7" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" }, "dependencies": { - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true } } }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "babel-runtime": "^6.22.0" } }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" }, "dependencies": { - "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "http-cache-semantics": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", - "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==", - "dev": true - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - }, - "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "core-js": { + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", + "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==", "dev": true } } }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "callsites": "^2.0.0" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "caller-callsite": "^2.0.0" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" } }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, - "caniuse-lite": { - "version": "1.0.30000974", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000974.tgz", - "integrity": "sha512-xc3rkNS/Zc3CmpMKuczWEdY2sZgx09BkAxfvkxlAEBTqcMHeL8QnPqhKse+5sRTi3nrw2pJwToD2WvKn1Uhvww==", + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", "dev": true }, - "canonical-path": { + "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/canonical-path/-/canonical-path-1.0.0.tgz", - "integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "has-flag": "^3.0.0" + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "dev": true + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "dev": true + }, + "base64id": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", "dev": true }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" + "tweetnacl": "^0.14.3" } }, - "chownr": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", - "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==", - "dev": true - }, - "chrome-trace-event": { + "better-assert": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", "dev": true, "requires": { - "tslib": "^1.9.0" + "callsite": "1.0.0" } }, - "ci-info": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "binary-extensions": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", "dev": true }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "blob": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", + "dev": true + }, + "blocking-proxy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", + "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "minimist": "^1.2.0" } }, - "circular-dependency-plugin": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", - "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==", + "bluebird": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", + "integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==", "dev": true }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true }, - "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", "dev": true, "requires": { - "source-map": "~0.6.0" + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", "dev": true } } }, - "cli-boxes": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", - "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" } }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "boxen": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-3.2.0.tgz", + "integrity": "sha512-cU4J/+NodM3IHdSL2yN8bqYqnmlBTidDR4RC7nJs61ZmtGz8VZzM3HLQX0zY5mrSmPtR3xWwsq2jOUQqFZN8+A==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^2.4.2", + "cli-boxes": "^2.2.0", + "string-width": "^3.0.0", + "term-size": "^1.2.0", + "type-fest": "^0.3.0", + "widest-line": "^2.0.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } + }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true } } }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", "dev": true }, - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { - "for-own": "^1.0.0", - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.0", - "shallow-clone": "^1.0.0" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, - "clone-response": { + "browserify-des": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, "requires": { - "mimic-response": "^1.0.0" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } }, - "codelyzer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-5.2.0.tgz", - "integrity": "sha512-izfUfhEOOgAizszPlEDxo71DK/C4wprZw0vkY6UWcOSTQvN1JyfXf9DXwaV7WX+/JC+hH0ShXfdtGLA9Rca7LA==", + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true, "requires": { - "app-root-path": "^2.2.1", - "aria-query": "^3.0.0", - "axobject-query": "^2.0.2", - "css-selector-tokenizer": "^0.7.1", - "cssauron": "^1.4.0", - "damerau-levenshtein": "^1.0.4", - "semver-dsl": "^1.0.1", - "source-map": "^0.5.7", - "sprintf-js": "^1.1.2" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - } + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" } }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "pako": "~1.0.5" } }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "browserslist": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.6.tgz", + "integrity": "sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA==", "dev": true, "requires": { - "color-name": "1.1.3" + "caniuse-lite": "^1.0.30000984", + "electron-to-chromium": "^1.3.191", + "node-releases": "^1.1.25" } }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "browserstack": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.5.3.tgz", + "integrity": "sha512-AO+mECXsW4QcqC9bxwM29O7qWa7bJT94uBFzeb5brylIQwawuEziwq20dPYbins95GlWzOawgyDNdjYAo32EKg==", + "dev": true, + "requires": { + "https-proxy-agent": "^2.2.1" + } }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", "dev": true, "requires": { - "delayed-stream": "~1.0.0" + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" } }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", "dev": true }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", "dev": true }, - "compare-versions": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.5.1.tgz", - "integrity": "sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg==", + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", "dev": true }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", + "builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", "dev": true }, - "compressible": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", - "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", - "dev": true, - "requires": { - "mime-db": ">= 1.40.0 < 2" - } + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "cacache": { + "version": "11.3.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", + "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", "dev": true, "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" } }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, - "configstore": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", - "integrity": "sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==", + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", "dev": true, "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" }, "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", "dev": true, "requires": { - "pify": "^3.0.0" + "pump": "^3.0.0" } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "http-cache-semantics": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", + "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==", + "dev": true + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", "dev": true } } }, - "connect": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", "dev": true, "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" + "callsites": "^2.0.0" } }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", - "dev": true - }, - "console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } }, - "constants-browserify": { + "callsite": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", "dev": true }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - } + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } + "caniuse-lite": { + "version": "1.0.30000986", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000986.tgz", + "integrity": "sha512-pM+LnkoAX0+QnIH3tpW5EnkmfpEoqOD8FAcoBvsl3Xh6DXkgctiCxeCbXphP/k3XJtJzm+zOAJbi6U6IVkpWZQ==", + "dev": true }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "canonical-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/canonical-path/-/canonical-path-1.0.0.tgz", + "integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==", "dev": true }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, - "copy-webpack-plugin": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.0.2.tgz", - "integrity": "sha512-7nC7EynPrnBTtBwwbG1aTqrfNS1aTb9eEjSmQDqFtKAsJrR3uDb+pCDIFT2LzhW+SgGJxQcYzThrmXzzZ720uw==", + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", "dev": true, "requires": { - "cacache": "^11.3.1", - "find-cache-dir": "^2.0.0", - "glob-parent": "^3.1.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "normalize-path": "^3.0.0", - "p-limit": "^2.1.0", - "serialize-javascript": "^1.4.0", - "webpack-log": "^2.0.0" + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } } }, - "core-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz", - "integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==", + "chownr": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", + "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==", "dev": true }, - "core-util-is": { + "chrome-trace-event": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", + "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", "dev": true, "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" + "tslib": "^1.9.0" } }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "cipher-base": "^1.0.1", "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "safe-buffer": "^5.0.1" } }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "circular-dependency-plugin": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", + "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } } }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "clean-css": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", + "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "source-map": "~0.6.0" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "cli-boxes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", + "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "restore-cursor": "^2.0.0" } }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, - "css-parse": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", - "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=", + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, - "css-selector-tokenizer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz", - "integrity": "sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==", + "clone-deep": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", "dev": true, "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" + "for-own": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.0", + "shallow-clone": "^1.0.0" } }, - "cssauron": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", - "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "through": "X.X.X" + "mimic-response": "^1.0.0" } }, - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", - "dev": true - }, - "cuint": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", - "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=", + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, - "cyclist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", - "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", - "dev": true + "codelyzer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-5.1.2.tgz", + "integrity": "sha512-1z7mtpwxcz5uUqq0HLO0ifj/tz2dWEmeaK+8c5TEZXAwwVxrjjg0118ODCOCCOcpfYaaEHxStNCaWVYo9FUPXw==", + "dev": true, + "requires": { + "app-root-path": "^2.2.1", + "aria-query": "^3.0.0", + "axobject-query": "^2.0.2", + "css-selector-tokenizer": "^0.7.1", + "cssauron": "^1.4.0", + "damerau-levenshtein": "^1.0.4", + "semver-dsl": "^1.0.1", + "source-map": "^0.5.7", + "sprintf-js": "^1.1.2" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + } + } }, - "damerau-levenshtein": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz", - "integrity": "sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA==", - "dev": true + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { - "assert-plus": "^1.0.0" + "color-name": "1.1.3" } }, - "date-format": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", - "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { - "ms": "2.0.0" + "delayed-stream": "~1.0.0" } }, - "debuglog": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "compare-versions": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.5.1.tgz", + "integrity": "sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg==", "dev": true }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", + "dev": true }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", "dev": true }, - "default-gateway": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", - "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", + "compressible": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", + "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", "dev": true, "requires": { - "execa": "^1.0.0", - "ip-regex": "^2.1.0" + "mime-db": ">= 1.40.0 < 2" } }, - "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", "dev": true, "requires": { - "strip-bom": "^3.0.0" + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" } }, - "defer-to-connect": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.0.tgz", - "integrity": "sha512-WE2sZoctWm/v4smfCAdjYbrfS55JiMRdlY9ZubFhsYbteCK9+BvAx4YV7nPjYM6ZnX5BcoVKwfmyx9sIFTgQMQ==", + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "configstore": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", + "integrity": "sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==", "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" }, "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "pify": "^3.0.0" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true } } }, - "del": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", - "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", "dev": true, "requires": { - "@types/glob": "^7.1.1", - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - } + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "connect-history-api-fallback": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", "dev": true }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", "dev": true }, - "dependency-graph": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.7.2.tgz", - "integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==", + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", "dev": true }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", "dev": true, "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "safe-buffer": "5.1.2" } }, - "destroy": { + "content-type": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", "dev": true }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "dev": true, "requires": { - "repeating": "^2.0.0" + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" } }, - "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, - "dezalgo": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", - "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "copy-webpack-plugin": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.0.4.tgz", + "integrity": "sha512-YBuYGpSzoCHSSDGyHy6VJ7SHojKp6WHT4D7ItcQFNAYx2hrwkMe56e97xfVR0/ovDuMTrMffXUiltvQljtAGeg==", "dev": true, "requires": { - "asap": "^2.0.0", - "wrappy": "1" + "cacache": "^11.3.3", + "find-cache-dir": "^2.1.0", + "glob-parent": "^3.1.0", + "globby": "^7.1.1", + "is-glob": "^4.0.1", + "loader-utils": "^1.2.3", + "minimatch": "^3.0.4", + "normalize-path": "^3.0.0", + "p-limit": "^2.2.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.7.0", + "webpack-log": "^2.0.0" } }, - "di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", + "core-js": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", + "integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==", "dev": true }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" } }, - "dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", - "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "dev": true, "requires": { - "path-type": "^3.0.0" + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" } }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { - "buffer-indexof": "^1.0.0" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, - "dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "is-obj": "^1.0.0" + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" } }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", "dev": true }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "css-parse": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", + "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=", + "dev": true + }, + "css-selector-tokenizer": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz", + "integrity": "sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==", "dev": true, "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "cssesc": "^0.1.0", + "fastparse": "^1.1.1", + "regexpu-core": "^1.0.0" } }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "cssauron": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", + "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", "dev": true, "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "through": "X.X.X" } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "cssesc": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", + "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", "dev": true }, - "electron-to-chromium": { - "version": "1.3.306", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.306.tgz", - "integrity": "sha512-frDqXvrIROoYvikSKTIKbHbzO6M3/qC6kCIt/1FOa9kALe++c4VAJnwjSFvf1tYLEUsP2n9XZ4XSCyqc3l7A/A==", + "cuint": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", + "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=", "dev": true }, - "elliptic": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", - "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", + "dev": true + }, + "cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true + }, + "damerau-levenshtein": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz", + "integrity": "sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA==", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "assert-plus": "^1.0.0" + } + }, + "date-format": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", + "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" } }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", "dev": true }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "dev": true, - "requires": { - "iconv-lite": "~0.4.13" - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "once": "^1.4.0" + "mimic-response": "^1.0.0" } }, - "engine.io": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", - "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", "dev": true, "requires": { - "accepts": "~1.3.4", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "ws": "~3.3.1" - }, - "dependencies": { - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" } }, - "engine.io-client": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", - "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~3.3.1", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - }, - "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true }, - "engine.io-parser": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", - "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", + "default-gateway": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", + "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", "dev": true, "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.5", - "has-binary2": "~1.0.2" + "execa": "^1.0.0", + "ip-regex": "^2.1.0" } }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" + "strip-bom": "^3.0.0" } }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", - "dev": true - }, - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", + "defer-to-connect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.0.tgz", + "integrity": "sha512-WE2sZoctWm/v4smfCAdjYbrfS55JiMRdlY9ZubFhsYbteCK9+BvAx4YV7nPjYM6ZnX5BcoVKwfmyx9sIFTgQMQ==", "dev": true }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "object-keys": "^1.0.12" } }, - "es-abstract": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", - "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.0", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-inspect": "^1.6.0", - "object-keys": "^1.1.1", - "string.prototype.trimleft": "^2.1.0", - "string.prototype.trimright": "^2.1.0" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "del": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "@types/glob": "^7.1.1", + "globby": "^6.1.0", + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + }, + "dependencies": { + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + } } }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dependency-graph": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.7.2.tgz", + "integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==", "dev": true }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "dev": true }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "estraverse": "^4.1.0" + "repeating": "^2.0.0" } }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "eventemitter3": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", - "dev": true - }, - "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "detect-node": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", + "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", "dev": true }, - "eventsource": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", - "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", - "dev": true, - "requires": { - "original": "^1.0.0" - } - }, - "evp_bytestokey": { + "dezalgo": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", "dev": true, "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "asap": "^2.0.0", + "wrappy": "1" } }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } + "di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", + "dev": true }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", "dev": true }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", "dev": true, "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - } + "path-type": "^3.0.0" } }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", "dev": true }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" } }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", "dev": true, "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" + "buffer-indexof": "^1.0.0" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", "dev": true }, - "fastparse": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", - "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", + "electron-to-chromium": { + "version": "1.3.308", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.308.tgz", + "integrity": "sha512-IwU/0LTzTa03Q0YDzg11RlK8e/V92tmPqFOaTEsdv7JJXtC/+v/H4bT2FmsA/xaFQWJvi0ZVcRppw8o0AD9XJQ==", "dev": true }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "elliptic": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", + "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", "dev": true, "requires": { - "websocket-driver": ">=0.5.1" + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" } }, - "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "iconv-lite": "~0.4.13" } }, - "file-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-3.0.1.tgz", - "integrity": "sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw==", + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^1.0.0" + "once": "^1.4.0" } }, - "fileset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", - "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "engine.io": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", + "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", "dev": true, "requires": { - "glob": "^7.0.3", - "minimatch": "^3.0.3" + "accepts": "~1.3.4", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.0", + "ws": "~3.3.1" + }, + "dependencies": { + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "engine.io-client": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", + "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "~3.3.1", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "ms": "2.0.0" } } } }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "engine.io-parser": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", + "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", "dev": true, "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.5", + "has-binary2": "~1.0.2" } }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "enhanced-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" } }, - "find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", "dev": true }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "err-code": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", + "dev": true + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "prr": "~1.0.1" } }, - "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", - "dev": true - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" + "is-arrayish": "^0.2.1" } }, - "follow-redirects": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", - "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", + "es-abstract": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", + "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", "dev": true, "requires": { - "debug": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.0", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-inspect": "^1.6.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.1.0", + "string.prototype.trimright": "^2.1.0" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { - "for-in": "^1.0.1" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", "dev": true }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "es6-promise": "^4.0.3" } }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", "dev": true }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { - "map-cache": "^0.2.2" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" + "estraverse": "^4.1.0" } }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "dev": true, - "requires": { - "null-check": "^1.0.0" - } + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "eventemitter3": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", + "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", + "dev": true + }, + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "dev": true }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "eventsource": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", + "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "original": "^1.0.0" } }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "minipass": "^2.6.0" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true - }, - "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, - "optional": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "is-descriptor": "^0.1.0" } }, - "npmlog": { - "version": "4.1.2", - "bundled": true, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "is-extendable": "^0.1.0" } + } + } + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dev": true, + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true }, - "number-is-nan": { + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, - "optional": true, "requires": { - "wrappy": "1" + "is-plain-object": "^2.0.4" } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, - "optional": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "is-descriptor": "^1.0.0" } }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } + "is-extendable": "^0.1.0" } }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, - "optional": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "kind-of": "^6.0.0" } }, - "rimraf": { - "version": "2.6.3", - "bundled": true, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, - "optional": true, "requires": { - "glob": "^7.1.3" + "kind-of": "^6.0.0" } }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { + "is-descriptor": { "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, - "optional": true, "requires": { - "ansi-regex": "^2.0.0" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fastparse": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", + "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", + "dev": true + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "figgy-pudding": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", + "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-loader": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-4.1.0.tgz", + "integrity": "sha512-ajDk1nlByoalZAGR4b0H6oD+EGlWnyW1qbSxzaUc7RFiqmn+RbXQQRbTc72jsiUIlVusJ4Et58ltds8ZwTfnAw==", + "dev": true, + "requires": { + "loader-utils": "^1.2.3", + "schema-utils": "^2.0.0" + }, + "dependencies": { + "schema-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", + "integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==", "dev": true, - "optional": true, "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1" } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, + } + } + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "^7.0.3", + "minimatch": "^3.0.3" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "dev": true + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "follow-redirects": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", + "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", + "dev": true, + "requires": { + "debug": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, - "optional": true, "requires": { - "string-width": "^1.0.2 || 2" + "ms": "^2.1.1" } }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", + "dev": true, + "requires": { + "null-check": "^1.0.0" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -4443,9 +4674,9 @@ } }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -4546,1277 +4777,1958 @@ "dev": true }, "handlebars": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.2.tgz", - "integrity": "sha512-29Zxv/cynYB7mkT1rVWQnV7mGX6v7H/miQ6dbEpYTKq5eJBN7PsRB+ViYJlcT6JINTSu4dVB9kOqEun78h6Exg==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", + "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", + "dev": true, + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-binary2": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "dev": true, + "requires": { + "isarray": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + } + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "dev": true + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "dev": true + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "http-parser-js": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", + "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", + "dev": true + }, + "http-proxy": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", + "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "dev": true, + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", "dev": true, "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" + "agent-base": "4", + "debug": "3.1.0" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } } } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "http-proxy-middleware": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", "dev": true, "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" + "http-proxy": "^1.17.0", + "is-glob": "^4.0.0", + "lodash": "^4.17.11", + "micromatch": "^3.1.10" } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, "requires": { - "function-bind": "^1.1.1" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", "dev": true, "requires": { - "isarray": "2.0.1" + "agent-base": "^4.3.0", + "debug": "^3.1.0" }, "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "dev": true, + "requires": { + "ms": "^2.0.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", "dev": true }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", "dev": true }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", "dev": true }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "ignore-walk": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", "dev": true, "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "minimatch": "^3.0.4" } }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } + "optional": true }, - "has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", "dev": true }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "import-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", + "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "import-from": "^2.1.0" } }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", "dev": true, "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" } }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "import-from": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", + "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", "dev": true, "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "resolve-from": "^3.0.0" } }, - "hosted-git-info": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", "dev": true }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" + "once": "^1.3.0", + "wrappy": "1" } }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "injection-js": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/injection-js/-/injection-js-2.2.2.tgz", + "integrity": "sha512-9K4fW2NNPG3JCvORx5G/T6q/PZYIr43RFgxBvtk3OV4omh5iqvpK4cChuBfhgPnRbXSgZRfuROh0XG5KNA8Xlg==", "dev": true }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "inquirer": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.0.tgz", + "integrity": "sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA==", "dev": true, "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" }, "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } } } }, - "http-parser-js": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", - "dev": true + "internal-ip": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", + "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", + "dev": true, + "requires": { + "default-gateway": "^4.2.0", + "ipaddr.js": "^1.9.0" + } }, - "http-proxy": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", - "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" + "loose-envify": "^1.0.0" } }, - "http-proxy-agent": { + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ip-regex": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true + }, + "ipaddr.js": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { - "agent-base": "4", - "debug": "3.1.0" + "kind-of": "^3.0.2" }, "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "ms": "2.0.0" + "is-buffer": "^1.1.5" } } } }, - "http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", - "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" + "binary-extensions": "^2.0.0" } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "ci-info": "^2.0.0" } }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { - "agent-base": "^4.3.0", - "debug": "^3.1.0" + "kind-of": "^3.0.2" }, "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "ms": "^2.1.1" + "is-buffer": "^1.1.5" } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true } } }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "dev": true, - "requires": { - "ms": "^2.0.0" - } + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } } }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", "dev": true }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", "dev": true }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "ignore-walk": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", - "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "minimatch": "^3.0.4" + "number-is-nan": "^1.0.0" } }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { - "import-from": "^2.1.0" + "is-extglob": "^2.1.1" } }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + }, + "dependencies": { + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + } } }, - "import-from": { + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "is-npm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-3.0.0.tgz", + "integrity": "sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true + }, + "is-path-in-cwd": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "is-path-inside": "^2.1.0" } }, - "import-lazy": { + "is-path-inside": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", "dev": true, "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" + "path-is-inside": "^1.0.2" } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", "dev": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "isobject": "^3.0.1" } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "injection-js": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/injection-js/-/injection-js-2.2.2.tgz", - "integrity": "sha512-9K4fW2NNPG3JCvORx5G/T6q/PZYIr43RFgxBvtk3OV4omh5iqvpK4cChuBfhgPnRbXSgZRfuROh0XG5KNA8Xlg==", + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, - "inquirer": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", - "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "is-reference": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", + "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", "dev": true, "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.11", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "@types/estree": "0.0.39" } }, - "internal-ip": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", - "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "default-gateway": "^4.2.0", - "ipaddr.js": "^1.9.0" + "has": "^1.0.1" } }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "has-symbols": "^1.0.1" } }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, - "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", "dev": true }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "isbinaryfile": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", "dev": true, "requires": { - "binary-extensions": "^1.0.0" + "buffer-alloc": "^1.2.0" } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "istanbul-api": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.6.tgz", + "integrity": "sha512-x0Eicp6KsShG1k1rMgBAi/1GgY7kFGEBwQpw3PXGEmu+rBcBNhqU8g2DgY9mlepAsLPzrzrbqSgCGANnki4POA==", "dev": true, "requires": { - "kind-of": "^3.0.2" + "async": "^2.6.2", + "compare-versions": "^3.4.0", + "fileset": "^2.0.3", + "istanbul-lib-coverage": "^2.0.5", + "istanbul-lib-hook": "^2.0.7", + "istanbul-lib-instrument": "^3.3.0", + "istanbul-lib-report": "^2.0.8", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^2.2.4", + "js-yaml": "^3.13.1", + "make-dir": "^2.1.0", + "minimatch": "^3.0.4", + "once": "^1.4.0" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", + "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "istanbul-lib-coverage": "^2.0.5", + "semver": "^6.0.0" } } } }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "istanbul-instrumenter-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", + "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "convert-source-map": "^1.5.0", + "istanbul-lib-instrument": "^1.7.3", + "loader-utils": "^1.1.0", + "schema-utils": "^0.3.0" }, "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", "dev": true + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "dev": true, + "requires": { + "ajv": "^5.0.0" + } } } }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "istanbul-lib-coverage": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", + "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", "dev": true }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "istanbul-lib-hook": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", + "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "append-transform": "^1.0.0" } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "istanbul-lib-instrument": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", + "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", "dev": true, "requires": { - "is-extglob": "^2.1.1" + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.2.1", + "semver": "^5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "istanbul-lib-report": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", "dev": true, "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" }, "dependencies": { - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "dev": true, "requires": { - "path-is-inside": "^1.0.1" + "has-flag": "^3.0.0" } } } }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", - "dev": true - }, - "is-npm": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-3.0.0.tgz", - "integrity": "sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA==", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", "dev": true, "requires": { - "kind-of": "^3.0.2" + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "ms": "^2.1.1" } + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true - }, - "is-path-in-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", - "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "istanbul-reports": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", + "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", "dev": true, "requires": { - "is-path-inside": "^2.1.0" + "handlebars": "^4.1.2" } }, - "is-path-inside": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", - "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "jasmine": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", + "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", "dev": true, "requires": { - "path-is-inside": "^1.0.2" + "exit": "^0.1.2", + "glob": "^7.0.6", + "jasmine-core": "~2.8.0" + }, + "dependencies": { + "jasmine-core": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", + "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=", + "dev": true + } } }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "jasmine-core": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.4.0.tgz", + "integrity": "sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg==", "dev": true }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "jasmine-spec-reporter": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", + "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", "dev": true, "requires": { - "isobject": "^3.0.1" + "colors": "1.1.2" } }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "jasminewd2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", + "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=", "dev": true }, - "is-reference": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", - "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", - "dev": true, - "requires": { - "@types/estree": "0.0.39" - } + "jquery": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz", + "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==" }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { - "has": "^1.0.1" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.0" - } + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", "dev": true }, - "is-windows": { + "json-parse-better-errors": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", "dev": true }, - "is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, - "isbinaryfile": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", - "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "json3": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", + "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jszip": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.2.tgz", + "integrity": "sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA==", "dev": true, "requires": { - "buffer-alloc": "^1.2.0" + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" } }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul-api": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.6.tgz", - "integrity": "sha512-x0Eicp6KsShG1k1rMgBAi/1GgY7kFGEBwQpw3PXGEmu+rBcBNhqU8g2DgY9mlepAsLPzrzrbqSgCGANnki4POA==", + "karma": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/karma/-/karma-4.1.0.tgz", + "integrity": "sha512-xckiDqyNi512U4dXGOOSyLKPwek6X/vUizSy2f3geYevbLj+UIdvNwbn7IwfUIL2g1GXEPWt/87qFD1fBbl/Uw==", "dev": true, "requires": { - "async": "^2.6.2", - "compare-versions": "^3.4.0", - "fileset": "^2.0.3", - "istanbul-lib-coverage": "^2.0.5", - "istanbul-lib-hook": "^2.0.7", - "istanbul-lib-instrument": "^3.3.0", - "istanbul-lib-report": "^2.0.8", - "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^2.2.4", - "js-yaml": "^3.13.1", - "make-dir": "^2.1.0", - "minimatch": "^3.0.4", - "once": "^1.4.0" + "bluebird": "^3.3.0", + "body-parser": "^1.16.1", + "braces": "^2.3.2", + "chokidar": "^2.0.3", + "colors": "^1.1.0", + "connect": "^3.6.0", + "core-js": "^2.2.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.0", + "flatted": "^2.0.0", + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "http-proxy": "^1.13.0", + "isbinaryfile": "^3.0.0", + "lodash": "^4.17.11", + "log4js": "^4.0.0", + "mime": "^2.3.1", + "minimatch": "^3.0.2", + "optimist": "^0.6.1", + "qjobs": "^1.1.4", + "range-parser": "^1.2.0", + "rimraf": "^2.6.0", + "safe-buffer": "^5.0.1", + "socket.io": "2.1.1", + "source-map": "^0.6.1", + "tmp": "0.0.33", + "useragent": "2.3.0" }, "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, - "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" } - } - } - }, - "istanbul-instrumenter-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", - "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", - "dev": true, - "requires": { - "convert-source-map": "^1.5.0", - "istanbul-lib-instrument": "^1.7.3", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" } }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "core-js": { + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", + "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==", "dev": true }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { - "ajv": "^5.0.0" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" } - } - } - }, - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", - "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", - "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.1", - "semver": "^5.3.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" - }, - "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - } - } - }, - "istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", - "source-map": "^0.6.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "ms": "^2.1.1" + "binary-extensions": "^1.0.0" } }, - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", - "dev": true, - "requires": { - "handlebars": "^4.1.2" - } - }, - "jasmine": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", - "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", - "dev": true, - "requires": { - "exit": "^0.1.2", - "glob": "^7.0.6", - "jasmine-core": "~2.8.0" - }, - "dependencies": { - "jasmine-core": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", - "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=", - "dev": true - } - } - }, - "jasmine-core": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.4.0.tgz", - "integrity": "sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg==", - "dev": true - }, - "jasmine-spec-reporter": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", - "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", - "dev": true, - "requires": { - "colors": "1.1.2" - } - }, - "jasminewd2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", - "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=", - "dev": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json3": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", - "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", - "dev": true - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jszip": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.2.tgz", - "integrity": "sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA==", - "dev": true, - "requires": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "set-immediate-shim": "~1.0.1" - } - }, - "karma": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/karma/-/karma-4.1.0.tgz", - "integrity": "sha512-xckiDqyNi512U4dXGOOSyLKPwek6X/vUizSy2f3geYevbLj+UIdvNwbn7IwfUIL2g1GXEPWt/87qFD1fBbl/Uw==", - "dev": true, - "requires": { - "bluebird": "^3.3.0", - "body-parser": "^1.16.1", - "braces": "^2.3.2", - "chokidar": "^2.0.3", - "colors": "^1.1.0", - "connect": "^3.6.0", - "core-js": "^2.2.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.0", - "flatted": "^2.0.0", - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "http-proxy": "^1.13.0", - "isbinaryfile": "^3.0.0", - "lodash": "^4.17.11", - "log4js": "^4.0.0", - "mime": "^2.3.1", - "minimatch": "^3.0.2", - "optimist": "^0.6.1", - "qjobs": "^1.1.4", - "range-parser": "^1.2.0", - "rimraf": "^2.6.0", - "safe-buffer": "^5.0.1", - "socket.io": "2.1.1", - "source-map": "^0.6.1", - "tmp": "0.0.33", - "useragent": "2.3.0" - }, - "dependencies": { - "core-js": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", - "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==", - "dev": true + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } }, "mime": { "version": "2.4.4", @@ -5824,11 +6736,32 @@ "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", "dev": true }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } } } }, @@ -5942,22 +6875,14 @@ } }, "less-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", - "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-5.0.0.tgz", + "integrity": "sha512-bquCU89mO/yWLaUq0Clk7qCsKhsF/TZpJUzETRvJa9KSVEL9SO3ovCvdEHISBhrC81OwC8QSVX7E0bzElZj9cg==", "dev": true, "requires": { "clone": "^2.1.1", "loader-utils": "^1.1.0", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } + "pify": "^4.0.1" } }, "less-plugin-npm-import": { @@ -6118,9 +7043,9 @@ } }, "magic-string": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", - "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", + "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==", "dev": true, "requires": { "sourcemap-codec": "^1.4.4" @@ -6151,22 +7076,47 @@ "dev": true }, "make-fetch-happen": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-4.0.2.tgz", - "integrity": "sha512-YMJrAjHSb/BordlsDEcVcPyTbiJKkzqMf48N8dAJZT9Zjctrkb6Yg4TY9Sq2AwSIQJFn5qBBKVTYt3vP5FMIHA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", + "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", "dev": true, "requires": { "agentkeepalive": "^3.4.1", - "cacache": "^11.3.3", + "cacache": "^12.0.0", "http-cache-semantics": "^3.8.1", "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", + "https-proxy-agent": "^2.2.3", "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "node-fetch-npm": "^2.0.2", "promise-retry": "^1.1.1", "socks-proxy-agent": "^4.0.0", "ssri": "^6.0.0" + }, + "dependencies": { + "cacache": { + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", + "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + } } }, "mamacro": { @@ -6268,6 +7218,90 @@ "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.2" + }, + "dependencies": { + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + } } }, "miller-rabin": { @@ -6314,13 +7348,13 @@ "dev": true }, "mini-css-extract-plugin": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.6.0.tgz", - "integrity": "sha512-79q5P7YGI6rdnVyIAV4NXpBQJFWdkzJxCim3Kog4078fM0piAaFlwocqbejdWtLW1cEzCexPrh6EdyFsPgVdAw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.0.tgz", + "integrity": "sha512-MNpRGbNA52q6U92i0qbVpQNsgk7LExy41MdAlG84FeytfDOtRIf/mCHdEgG8rpTKOaNKiqUnZdlptF469hxqOw==", "dev": true, "requires": { "loader-utils": "^1.1.0", - "normalize-url": "^2.0.1", + "normalize-url": "1.9.1", "schema-utils": "^1.0.0", "webpack-sources": "^1.1.0" } @@ -6560,119 +7594,12 @@ "update-notifier": "^3.0.0" }, "dependencies": { - "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "autoprefixer": { - "version": "9.7.1", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.1.tgz", - "integrity": "sha512-w3b5y1PXWlhYulevrTJ0lizkQ5CyqfeU6BIRDbuhsMupstHQOeb1Ur80tcB1zxSu7AwyY/qCQ7Vvqklh31ZBFw==", - "dev": true, - "requires": { - "browserslist": "^4.7.2", - "caniuse-lite": "^1.0.30001006", - "chalk": "^2.4.2", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.21", - "postcss-value-parser": "^4.0.2" - }, - "dependencies": { - "browserslist": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.2.tgz", - "integrity": "sha512-uZavT/gZXJd2UTi9Ov7/Z340WOSQ3+m1iBVRUknf+okKxonL9P83S3ctiBDtuRmRu8PiCHjqyueqQ9HYlJhxiw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001004", - "electron-to-chromium": "^1.3.295", - "node-releases": "^1.1.38" - } - }, - "postcss": { - "version": "7.0.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz", - "integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - } - } - }, - "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "caniuse-lite": { - "version": "1.0.30001010", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001010.tgz", - "integrity": "sha512-RA5GH9YjFNea4ZQszdWgh2SC+dpLiRAg4VDQS2b5JRI45OxmbGrYocYHTa9x0bKMQUE7uvHkNPNffUr+pCxSGw==", - "dev": true - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, "commander": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", "dev": true }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -6684,52 +7611,6 @@ "universalify": "^0.1.0" } }, - "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", - "dev": true, - "optional": true - }, - "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "postcss-value-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", - "dev": true - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "requires": { - "picomatch": "^2.0.4" - } - }, "rimraf": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", @@ -6738,40 +7619,6 @@ "requires": { "glob": "^7.1.3" } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "terser": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.4.0.tgz", - "integrity": "sha512-oDG16n2WKm27JO8h4y/w3iqBGAOSCtq7k8dRmrn4Wf9NouL0b2WpMHGChFGZq4nFAQy1FsNJrVQHfurXOSTmOA==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } } } }, @@ -6844,14 +7691,6 @@ "dev": true, "requires": { "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "node-sass-tilde-importer": { @@ -6896,14 +7735,15 @@ "dev": true }, "normalize-url": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", - "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", "dev": true, "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" } }, "npm-bundled": { @@ -6962,17 +7802,26 @@ } }, "npm-registry-fetch": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.9.1.tgz", - "integrity": "sha512-VQCEZlydXw4AwLROAXWUR7QDfe2Y8Id/vpAgp6TI1/H78a4SiQ1kQrKZALm5/zxM5n4HIi+aYb+idUAV/RuY0Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz", + "integrity": "sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A==", "dev": true, "requires": { "JSONStream": "^1.3.4", "bluebird": "^3.5.1", "figgy-pudding": "^3.4.1", "lru-cache": "^5.1.1", - "make-fetch-happen": "^4.0.2", - "npm-package-arg": "^6.1.0" + "make-fetch-happen": "^5.0.0", + "npm-package-arg": "^6.1.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "dev": true + } } }, "npm-run-path": { @@ -7145,9 +7994,9 @@ } }, "open": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/open/-/open-6.2.0.tgz", - "integrity": "sha512-Vxf6HJkwrqmvh9UAID3MnMYXntbTxKLOSfOnO7LJdzPf3NE3KQYFNV0/Lcz2VAndbRFil58XVCyh8tiX11fiYw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", + "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", "dev": true, "requires": { "is-wsl": "^1.1.0" @@ -7276,6 +8125,15 @@ "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true }, + "p-retry": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", + "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", + "dev": true, + "requires": { + "retry": "^0.12.0" + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -7292,29 +8150,21 @@ "registry-auth-token": "^4.0.0", "registry-url": "^5.0.0", "semver": "^6.2.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "pacote": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.0.tgz", - "integrity": "sha512-aUplXozRbzhaJO48FaaeClmN+2Mwt741MC6M3bevIGZwdCaP7frXzbUOfOWa91FPHoLITzG0hYaKY363lxO3bg==", + "version": "9.5.4", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.4.tgz", + "integrity": "sha512-nWr0ari6E+apbdoN0hToTKZElO5h4y8DGFa2pyNA5GQIdcP0imC96bA0bbPw1gpeguVIiUgHHaAlq/6xfPp8Qw==", "dev": true, "requires": { "bluebird": "^3.5.3", - "cacache": "^11.3.2", + "cacache": "^12.0.0", "figgy-pudding": "^3.5.1", "get-stream": "^4.1.0", "glob": "^7.1.3", "lru-cache": "^5.1.1", - "make-fetch-happen": "^4.0.1", + "make-fetch-happen": "^5.0.0", "minimatch": "^3.0.4", "minipass": "^2.3.5", "mississippi": "^3.0.0", @@ -7323,7 +8173,7 @@ "npm-package-arg": "^6.1.0", "npm-packlist": "^1.1.12", "npm-pick-manifest": "^2.2.3", - "npm-registry-fetch": "^3.8.0", + "npm-registry-fetch": "^4.0.0", "osenv": "^0.1.5", "promise-inflight": "^1.0.1", "promise-retry": "^1.1.1", @@ -7337,6 +8187,29 @@ "which": "^1.3.1" }, "dependencies": { + "cacache": { + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", + "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -7387,10 +8260,10 @@ } }, "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", - "dev": true + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "optional": true }, "parseqs": { "version": "0.0.5", @@ -7577,9 +8450,9 @@ "dev": true }, "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "version": "7.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", + "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -7592,6 +8465,15 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, @@ -7605,6 +8487,14 @@ "postcss-value-parser": "^3.2.3", "read-cache": "^1.0.0", "resolve": "^1.1.7" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } } }, "postcss-load-config": { @@ -7651,15 +8541,15 @@ } }, "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", + "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", "dev": true }, "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, "process": { @@ -7698,6 +8588,14 @@ "requires": { "err-code": "^1.0.0", "retry": "^0.10.0" + }, + "dependencies": { + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + } } }, "protoduck": { @@ -7958,12 +8856,11 @@ "dev": true }, "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", "dev": true, "requires": { - "decode-uri-component": "^0.2.0", "object-assign": "^4.1.0", "strict-uri-encode": "^1.0.0" } @@ -8084,16 +8981,14 @@ } }, "read-package-tree": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.2.2.tgz", - "integrity": "sha512-rW3XWUUkhdKmN2JKB4FL563YAgtINifso5KShykufR03nJ5loGFlkUMe1g/yxmqX073SoYYTsgXu7XdDinKZuA==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", + "integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", "dev": true, "requires": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "once": "^1.3.0", "read-package-json": "^2.0.0", - "readdir-scoped-modules": "^1.0.0" + "readdir-scoped-modules": "^1.0.0", + "util-promisify": "^2.1.0" } }, "read-pkg": { @@ -8155,28 +9050,17 @@ "requires": { "debuglog": "^1.0.1", "dezalgo": "^1.0.0", - "graceful-fs": "^4.1.2", - "once": "^1.3.0" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" + "graceful-fs": "^4.1.2", + "once": "^1.3.0" } }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", "dev": true, "requires": { - "resolve": "^1.1.6" + "picomatch": "^2.0.4" } }, "reflect-metadata": { @@ -8398,9 +9282,9 @@ "dev": true }, "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true }, "rfdc": { @@ -8480,14 +9364,6 @@ "is-module": "^1.0.0", "resolve": "^1.11.1", "rollup-pluginutils": "^2.8.1" - }, - "dependencies": { - "builtin-modules": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", - "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", - "dev": true - } } }, "rollup-plugin-sourcemaps": { @@ -8518,667 +9394,1011 @@ "is-promise": "^2.1.0" } }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sass": { + "version": "1.22.7", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.22.7.tgz", + "integrity": "sha512-ahREi0AdG7RTovSv14+yd1prQSfIvFcrDpOsth5EQf1+RM7SvOxsSttzNQaFmK1aa/k/3vyYwlYF5l0Xl+6c+g==", + "dev": true, + "requires": { + "chokidar": ">=2.0.0 <4.0.0" + } + }, + "sass-loader": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.1.0.tgz", + "integrity": "sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==", + "dev": true, + "requires": { + "clone-deep": "^2.0.1", + "loader-utils": "^1.0.1", + "lodash.tail": "^4.1.1", + "neo-async": "^2.5.0", + "pify": "^3.0.0", + "semver": "^5.5.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "saucelabs": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz", + "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", + "dev": true, + "requires": { + "https-proxy-agent": "^2.2.1" + } + }, + "sax": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", + "dev": true + }, + "selenium-webdriver": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", + "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", + "dev": true, + "requires": { + "jszip": "^3.1.3", + "rimraf": "^2.5.4", + "tmp": "0.0.30", + "xml2js": "^0.4.17" + }, + "dependencies": { + "tmp": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", + "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.1" + } + } + } + }, + "selfsigned": { + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", + "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", + "dev": true, + "requires": { + "node-forge": "0.9.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "^5.0.3" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "semver-dsl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", + "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", + "dev": true, + "requires": { + "semver": "^5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "semver-intersect": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz", + "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==", + "dev": true, + "requires": { + "semver": "^5.0.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", + "dev": true + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", "dev": true, "requires": { - "aproba": "^1.1.1" + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" } }, - "rxjs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", - "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", - "requires": { - "tslib": "^1.9.0" - } + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", "dev": true }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { - "ret": "~0.1.10" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "dev": true }, - "sass": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.19.0.tgz", - "integrity": "sha512-8kzKCgxCzh8/zEn3AuRwzLWVSSFj8omkiGwqdJdeOufjM+I88dXxu9LYJ/Gw4rRTHXesN0r1AixBuqM6yLQUJw==", + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { - "chokidar": "^2.0.0" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "sass-loader": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.1.0.tgz", - "integrity": "sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==", + "shallow-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", "dev": true, "requires": { - "clone-deep": "^2.0.1", - "loader-utils": "^1.0.1", - "lodash.tail": "^4.1.1", - "neo-async": "^2.5.0", - "pify": "^3.0.0", - "semver": "^5.5.0" + "is-extendable": "^0.1.1", + "kind-of": "^5.0.0", + "mixin-object": "^2.0.1" }, "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true } } }, - "saucelabs": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz", - "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "https-proxy-agent": "^2.2.1" + "shebang-regex": "^1.0.0" } }, - "sax": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=", + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "schema-utils": { + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "smart-buffer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", + "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selenium-webdriver": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", - "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { - "jszip": "^3.1.3", - "rimraf": "^2.5.4", - "tmp": "0.0.30", - "xml2js": "^0.4.17" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { - "tmp": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", - "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "os-tmpdir": "~1.0.1" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } }, - "selfsigned": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", - "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", - "dev": true, - "requires": { - "node-forge": "0.9.0" - } - }, - "semver": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", - "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", - "dev": true - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { - "semver": "^5.0.3" + "kind-of": "^3.2.0" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } } } }, - "semver-dsl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", - "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", + "socket.io": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", + "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", "dev": true, "requires": { - "semver": "^5.3.0" + "debug": "~3.1.0", + "engine.io": "~3.2.0", + "has-binary2": "~1.0.2", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.1.1", + "socket.io-parser": "~3.2.0" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } } } }, - "semver-intersect": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz", - "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==", + "socket.io-adapter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", + "dev": true + }, + "socket.io-client": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", + "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", "dev": true, "requires": { - "semver": "^5.0.0" + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "engine.io-client": "~3.2.0", + "has-binary2": "~1.0.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.2.0", + "to-array": "0.1.4" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } } } }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "socket.io-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", + "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", "dev": true, "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "isarray": "2.0.1" }, "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", "dev": true } } }, - "serialize-javascript": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", - "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", - "dev": true + "sockjs": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "dev": true, + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^3.0.1" + } }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "sockjs-client": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz", + "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", "dev": true, "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" + "debug": "^3.2.5", + "eventsource": "^1.0.7", + "faye-websocket": "~0.11.1", + "inherits": "^2.0.3", + "json3": "^3.3.2", + "url-parse": "^1.4.3" }, "dependencies": { - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "ms": "^2.1.1" } }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "faye-websocket": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", + "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true + "socks": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", + "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", + "dev": true, + "requires": { + "ip": "1.1.5", + "smart-buffer": "^4.1.0" + } }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "socks-proxy-agent": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", + "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "agent-base": "~4.2.1", + "socks": "~2.3.2" }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "es6-promisify": "^5.0.0" } } } }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", "dev": true }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "source-map-loader": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.4.tgz", + "integrity": "sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "async": "^2.5.0", + "loader-utils": "^1.1.0" } }, - "shallow-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", - "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "dev": true, "requires": { - "is-extendable": "^0.1.1", - "kind-of": "^5.0.0", - "mixin-object": "^2.0.1" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" }, "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "sourcemap-codec": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", + "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==", "dev": true }, - "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", "dev": true }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } }, - "smart-buffer": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", - "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "spdy": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.1.tgz", + "integrity": "sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==", "dev": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "ms": "^2.1.1" } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", "dev": true, "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "ms": "^2.1.1" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "readable-stream": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", + "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } } } }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "speed-measure-webpack-plugin": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.3.1.tgz", + "integrity": "sha512-qVIkJvbtS9j/UeZumbdfz0vg+QfG/zxonAjzefZrqzkr7xOncLVXkeGbTpzd1gjCBM4PmVNkWlkeTVhgskAGSQ==", "dev": true, "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "chalk": "^2.0.1" } }, - "socket.io": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", - "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { - "debug": "~3.1.0", - "engine.io": "~3.2.0", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.1.1", - "socket.io-parser": "~3.2.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "extend-shallow": "^3.0.0" } }, - "socket.io-adapter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "socket.io-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", - "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "dev": true, "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "engine.io-client": "~3.2.0", - "has-binary2": "~1.0.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.2.0", - "to-array": "0.1.4" - }, - "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" } }, - "socket.io-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", - "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "isarray": "2.0.1" + "figgy-pudding": "^3.5.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "ms": "2.0.0" + "is-descriptor": "^0.1.0" } - }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true } } }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", "dev": true, "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" } }, - "sockjs-client": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz", - "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", "dev": true, "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "faye-websocket": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", - "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "streamroller": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-1.0.6.tgz", + "integrity": "sha512-3QC47Mhv3/aZNFpDDVO44qQb9gwB9QggMEE0sQmkTAwBVYdBRWISdsywlkfm5II1Q5y/pmrHflti/IgmIzdDBg==", + "dev": true, + "requires": { + "async": "^2.6.2", + "date-format": "^2.0.0", + "debug": "^3.2.6", + "fs-extra": "^7.0.1", + "lodash": "^4.17.14" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "websocket-driver": ">=0.5.1" + "ms": "^2.1.1" } }, "ms": { @@ -9189,1429 +10409,2467 @@ } } }, - "socks": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", - "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", - "dev": true, - "requires": { - "ip": "1.1.5", - "smart-buffer": "^4.1.0" - } + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true }, - "socks-proxy-agent": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", - "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "agent-base": "~4.2.1", - "socks": "~2.3.2" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "es6-promisify": "^5.0.0" + "ansi-regex": "^3.0.0" } } } }, - "sort-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "string.prototype.trimleft": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", + "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", "dev": true, "requires": { - "is-plain-obj": "^1.0.0" + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" } }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - }, - "source-map-loader": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.4.tgz", - "integrity": "sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ==", + "string.prototype.trimright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", + "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", "dev": true, "requires": { - "async": "^2.5.0", - "loader-utils": "^1.1.0" + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" } }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "safe-buffer": "~5.1.0" } }, - "source-map-support": { - "version": "0.5.12", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", - "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "ansi-regex": "^2.0.0" } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sourcemap-codec": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", - "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==", + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, - "spdy": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.1.tgz", - "integrity": "sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==", + "style-loader": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz", + "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", "dev": true, "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } + "loader-utils": "^1.1.0", + "schema-utils": "^1.0.0" } }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "stylus": { + "version": "0.54.5", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", + "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", "dev": true, "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" + "css-parse": "1.7.x", + "debug": "*", + "glob": "7.0.x", + "mkdirp": "0.5.x", + "sax": "0.5.x", + "source-map": "0.1.x" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", "dev": true, "requires": { - "ms": "^2.1.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "amdefine": ">=0.0.4" } } } }, - "speed-measure-webpack-plugin": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.3.1.tgz", - "integrity": "sha512-qVIkJvbtS9j/UeZumbdfz0vg+QfG/zxonAjzefZrqzkr7xOncLVXkeGbTpzd1gjCBM4PmVNkWlkeTVhgskAGSQ==", + "stylus-loader": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", + "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", "dev": true, "requires": { - "chalk": "^2.0.1" + "loader-utils": "^1.0.2", + "lodash.clonedeep": "^4.5.0", + "when": "~3.6.x" } }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "extend-shallow": "^3.0.0" + "has-flag": "^3.0.0" } }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", "dev": true }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", "dev": true, "requires": { - "figgy-pudding": "^3.5.1" + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" } }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "execa": "^0.7.0" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } }, - "stats-webpack-plugin": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.7.0.tgz", - "integrity": "sha512-NT0YGhwuQ0EOX+uPhhUcI6/+1Sq/pMzNuSCBVT4GbFl/ac6I/JZefBcjlECNfAb1t3GOx5dEj1Z7x0cAxeeVLQ==", + "terser": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.4.0.tgz", + "integrity": "sha512-oDG16n2WKm27JO8h4y/w3iqBGAOSCtq7k8dRmrn4Wf9NouL0b2WpMHGChFGZq4nFAQy1FsNJrVQHfurXOSTmOA==", "dev": true, "requires": { - "lodash": "^4.17.4" + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "terser-webpack-plugin": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.3.0.tgz", + "integrity": "sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg==", + "dev": true, + "requires": { + "cacache": "^11.3.2", + "find-cache-dir": "^2.0.0", + "is-wsl": "^1.1.0", + "loader-utils": "^1.2.3", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.7.0", + "source-map": "^0.6.1", + "terser": "^4.0.0", + "webpack-sources": "^1.3.0", + "worker-farm": "^1.7.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true + }, + "timers-browserify": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", "dev": true, "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" + "setimmediate": "^1.0.4" } }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" + "os-tmpdir": "~1.0.2" } }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", "dev": true }, - "streamroller": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-1.0.6.tgz", - "integrity": "sha512-3QC47Mhv3/aZNFpDDVO44qQb9gwB9QggMEE0sQmkTAwBVYdBRWISdsywlkfm5II1Q5y/pmrHflti/IgmIzdDBg==", + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { - "async": "^2.6.2", - "date-format": "^2.0.0", - "debug": "^3.2.6", - "fs-extra": "^7.0.1", - "lodash": "^4.17.14" + "kind-of": "^3.0.2" }, "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "ms": "^2.1.1" + "is-buffer": "^1.1.5" } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true } } }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", "dev": true }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "psl": "^1.1.24", + "punycode": "^1.4.1" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } } } }, - "string.prototype.trimleft": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", - "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "tree-kill": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", + "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "ts-node": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz", + "integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.6", + "yn": "^3.0.0" } }, - "string.prototype.trimright": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", - "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "tsickle": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.35.0.tgz", + "integrity": "sha512-irsZLX4293YUl9TuwNC5Fy020eLSc4bC3LfKnxnx1oq5wmZD9zSP8qvNNTiwRmf2/rxH+58JINcTARDjuvn+oQ==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map": "^0.7.3" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + }, + "tslint": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz", + "integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "tslib": "^1.8.1" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "dev": true }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true }, - "style-loader": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz", - "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dev": true, "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0" + "media-typer": "0.3.0", + "mime-types": "~2.1.24" } }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", + "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", + "dev": true + }, + "uglify-js": { + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.9.tgz", + "integrity": "sha512-pcnnhaoG6RtrvHJ1dFncAe8Od6Nuy30oaJ82ts6//sGSXOP5UjBMEthiProjXmMNHOfd93sqlkztifFMcb+4yw==", "dev": true, + "optional": true, "requires": { - "css-parse": "1.7.x", - "debug": "*", - "glob": "7.0.x", - "mkdirp": "0.5.x", - "sax": "0.5.x", - "source-map": "0.1.x" + "commander": "~2.20.3", + "source-map": "~0.6.1" }, "dependencies": { - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } + "optional": true } } }, - "stylus-loader": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", - "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "requires": { - "loader-utils": "^1.0.2", - "lodash.clonedeep": "^4.5.0", - "when": "~3.6.x" + "unique-slug": "^2.0.0" } }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "imurmurhash": "^0.1.4" } }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", - "dev": true - }, - "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" + "crypto-random-string": "^1.0.0" } }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "universal-analytics": { + "version": "0.4.20", + "resolved": "https://registry.npmjs.org/universal-analytics/-/universal-analytics-0.4.20.tgz", + "integrity": "sha512-gE91dtMvNkjO+kWsPstHRtSwHXz0l2axqptGYp5ceg4MsuurloM0PU3pdOfpb5zBXUvyjT4PwhWK2m39uczZuw==", "dev": true, "requires": { - "execa": "^0.7.0" + "debug": "^3.0.0", + "request": "^2.88.0", + "uuid": "^3.0.0" }, "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "ms": "^2.1.1" } }, - "yallist": { + "ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, - "terser": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", - "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { - "commander": "^2.19.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.10" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true } } }, - "terser-webpack-plugin": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.3.tgz", - "integrity": "sha512-GOK7q85oAb/5kE12fMuLdn2btOS9OBZn4VsecpHDywoUC/jLhSAKOiYo0ezx7ss2EXPMzyEWFoE0s1WLE+4+oA==", + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "update-notifier": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-3.0.1.tgz", + "integrity": "sha512-grrmrB6Zb8DUiyDIaeRTBCkgISYUgETNe7NglEbVsrLWXeESnlCSP50WfRSj/GmzMPl6Uchj24S/p80nP/ZQrQ==", "dev": true, "requires": { - "cacache": "^11.0.2", - "find-cache-dir": "^2.0.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "terser": "^3.16.1", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "boxen": "^3.0.0", + "chalk": "^2.0.1", + "configstore": "^4.0.0", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.1.0", + "is-npm": "^3.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" + "punycode": "^2.1.0" } }, - "thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, - "timers-browserify": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", - "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", "dev": true, "requires": { - "setimmediate": "^1.0.4" + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "url-parse": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", + "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + } } }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "useragent": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", + "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", "dev": true, "requires": { - "kind-of": "^3.0.2" + "lru-cache": "4.1.x", + "tmp": "0.0.x" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } }, - "to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", "dev": true, "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } } }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util-promisify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz", + "integrity": "sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=", "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "object.getownpropertydescriptors": "^2.0.3" } }, - "toidentifier": { + "util.promisify": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", "dev": true, "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" } }, - "tree-kill": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", - "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", "dev": true }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "uuid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", "dev": true }, - "ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, - "tsickle": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.35.0.tgz", - "integrity": "sha512-irsZLX4293YUl9TuwNC5Fy020eLSc4bC3LfKnxnx1oq5wmZD9zSP8qvNNTiwRmf2/rxH+58JINcTARDjuvn+oQ==", + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", "dev": true, "requires": { - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map": "^0.7.3" + "builtins": "^1.0.3" } }, - "tslib": { + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "verror": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } }, - "tslint": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz", - "integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==", + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", + "dev": true + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "dev": true, "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.13.0", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } } } }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "dev": true, "requires": { - "tslib": "^1.8.1" + "minimalistic-assert": "^1.0.0" } }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "webdriver-js-extender": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", + "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", "dev": true, "requires": { - "safe-buffer": "^5.0.1" + "@types/selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.0.1" } }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "webpack": { + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.38.0.tgz", + "integrity": "sha512-lbuFsVOq8PZY+1Ytz/mYOvYOo+d4IJ31hHk/7iyoeWtwN33V+5HYotSH+UIb9tq914ey0Hot7z6HugD+je3sWw==", "dev": true, "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/wasm-edit": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "acorn": "^6.2.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.1.0", + "eslint-scope": "^4.0.0", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^1.0.0", + "tapable": "^1.1.0", + "terser-webpack-plugin": "^1.1.0", + "watchpack": "^1.5.0", + "webpack-sources": "^1.3.0" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "3.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", - "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==", - "dev": true - }, - "uglify-js": { - "version": "3.6.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.9.tgz", - "integrity": "sha512-pcnnhaoG6RtrvHJ1dFncAe8Od6Nuy30oaJ82ts6//sGSXOP5UjBMEthiProjXmMNHOfd93sqlkztifFMcb+4yw==", + "webpack-core": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", + "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", "dev": true, - "optional": true, "requires": { - "commander": "~2.20.3", - "source-map": "~0.6.1" + "source-list-map": "~0.1.7", + "source-map": "~0.4.1" }, "dependencies": { + "source-list-map": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", + "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", + "dev": true + }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, - "optional": true + "requires": { + "amdefine": ">=0.0.4" + } } } }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "webpack-dev-middleware": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.0.tgz", + "integrity": "sha512-qvDesR1QZRIAZHOE3iQ4CXLZZSQ1lAUsSpnQmlB1PBfoN/xdRjmge3Dok0W4IdaVLJOGJy3sGI4sZHwjRU0PCA==", "dev": true, "requires": { - "crypto-random-string": "^1.0.0" + "memory-fs": "^0.4.1", + "mime": "^2.4.2", + "range-parser": "^1.2.1", + "webpack-log": "^2.0.0" + }, + "dependencies": { + "mime": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", + "dev": true + } } }, - "universal-analytics": { - "version": "0.4.20", - "resolved": "https://registry.npmjs.org/universal-analytics/-/universal-analytics-0.4.20.tgz", - "integrity": "sha512-gE91dtMvNkjO+kWsPstHRtSwHXz0l2axqptGYp5ceg4MsuurloM0PU3pdOfpb5zBXUvyjT4PwhWK2m39uczZuw==", + "webpack-dev-server": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.7.2.tgz", + "integrity": "sha512-mjWtrKJW2T9SsjJ4/dxDC2fkFVUw8jlpemDERqV0ZJIkjjjamR2AbQlr3oz+j4JLhYCHImHnXZK5H06P2wvUew==", "dev": true, "requires": { - "debug": "^3.0.0", - "request": "^2.88.0", - "uuid": "^3.0.0" + "ansi-html": "0.0.7", + "bonjour": "^3.5.0", + "chokidar": "^2.1.6", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.2.1", + "http-proxy-middleware": "^0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "killable": "^1.0.1", + "loglevel": "^1.6.3", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.20", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.4", + "semver": "^6.1.1", + "serve-index": "^1.9.1", + "sockjs": "0.3.19", + "sockjs-client": "1.3.0", + "spdy": "^4.0.0", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.0", + "webpack-log": "^2.0.0", + "yargs": "12.0.5" }, "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "ms": "^2.1.1" + "binary-extensions": "^1.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } + "kind-of": "^3.0.2" } }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true - }, - "update-notifier": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-3.0.1.tgz", - "integrity": "sha512-grrmrB6Zb8DUiyDIaeRTBCkgISYUgETNe7NglEbVsrLWXeESnlCSP50WfRSj/GmzMPl6Uchj24S/p80nP/ZQrQ==", - "dev": true, - "requires": { - "boxen": "^3.0.0", - "chalk": "^2.0.1", - "configstore": "^4.0.0", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.1.0", - "is-npm": "^3.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", - "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", - "dev": true, - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "requires": { - "prepend-http": "^2.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "useragent": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", - "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", - "dev": true, - "requires": { - "lru-cache": "4.1.x", - "tmp": "0.0.x" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "is-buffer": "^1.1.5" } }, - "yallist": { + "ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", - "dev": true, - "requires": { - "builtins": "^1.0.3" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", - "dev": true - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webdriver-js-extender": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", - "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", - "dev": true, - "requires": { - "@types/selenium-webdriver": "^3.0.0", - "selenium-webdriver": "^3.0.1" - } - }, - "webpack": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.30.0.tgz", - "integrity": "sha512-4hgvO2YbAFUhyTdlR4FNyt2+YaYBYHavyzjCMbZzgglo02rlKi/pcsEzwCuCpsn1ryzIl1cq/u8ArIKu8JBYMg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/wasm-edit": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "acorn": "^6.0.5", - "acorn-dynamic-import": "^4.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^1.0.0", - "tapable": "^1.1.0", - "terser-webpack-plugin": "^1.1.0", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" - } - }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", - "dev": true, - "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" - }, - "dependencies": { - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "dev": true, "requires": { - "amdefine": ">=0.0.4" + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" } - } - } - }, - "webpack-dev-middleware": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.6.2.tgz", - "integrity": "sha512-A47I5SX60IkHrMmZUlB0ZKSWi29TZTcPz7cha1Z75yYOsgWh/1AcPmQEbC8ZIbU3A1ytSv1PMU0PyPz2Lmz2jg==", - "dev": true, - "requires": { - "memory-fs": "^0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "mime": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", - "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", - "dev": true - } - } - }, - "webpack-dev-server": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.3.1.tgz", - "integrity": "sha512-jY09LikOyGZrxVTXK0mgIq9y2IhCoJ05848dKZqX1gAGLU1YDqgpOT71+W53JH/wI4v6ky4hm+KvSyW14JEs5A==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.1.5", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "debug": "^4.1.1", - "del": "^4.1.0", - "express": "^4.16.4", - "html-entities": "^1.2.1", - "http-proxy-middleware": "^0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.2.0", - "ip": "^1.1.5", - "killable": "^1.0.1", - "loglevel": "^1.6.1", - "opn": "^5.5.0", - "portfinder": "^1.0.20", - "schema-utils": "^1.0.0", - "selfsigned": "^1.10.4", - "semver": "^6.0.0", - "serve-index": "^1.9.1", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", - "spdy": "^4.0.0", - "strip-ansi": "^3.0.1", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.6.2", - "webpack-log": "^2.0.0", - "yargs": "12.0.5" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "has-flag": "^3.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } } } }, @@ -10893,9 +13151,9 @@ "dev": true }, "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true }, "zone.js": { diff --git a/package.json b/package.json index ad56618..4b0f22c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "scripts": { "ng": "ng", - "start": "ng serve", + "start": "ng serve --open", "build": "ng build ngx-flowchart --prod", "test": "ng test ngx-flowchart", "lint": "ng lint", @@ -11,28 +11,31 @@ }, "private": true, "dependencies": { - "@angular/animations": "~8.0.0", - "@angular/common": "~8.0.0", - "@angular/compiler": "~8.0.0", - "@angular/core": "~8.0.0", - "@angular/forms": "~8.0.0", - "@angular/platform-browser": "~8.0.0", - "@angular/platform-browser-dynamic": "~8.0.0", - "@angular/router": "~8.0.0", - "rxjs": "~6.4.0", - "tslib": "^1.9.0", + "@angular/animations": "~8.2.11", + "@angular/common": "~8.2.11", + "@angular/cdk": "~8.2.3", + "@angular/compiler": "~8.2.11", + "@angular/core": "~8.2.11", + "@angular/forms": "~8.2.11", + "@angular/platform-browser": "~8.2.11", + "@angular/platform-browser-dynamic": "~8.2.11", + "@angular/router": "~8.2.11", + "jquery": "^3.4.1", + "rxjs": "~6.5.2", + "tslib": "^1.10.0", "zone.js": "~0.9.1" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.800.0", - "@angular-devkit/build-ng-packagr": "~0.800.6", - "@angular/cli": "~8.0.1", - "@angular/compiler-cli": "~8.0.0", - "@angular/language-service": "~8.0.0", - "@types/node": "~8.9.4", + "@angular-devkit/build-angular": "^0.802.0", + "@angular-devkit/build-ng-packagr": "~0.803.19", + "@angular/cli": "~8.2.2", + "@angular/compiler-cli": "~8.2.11", + "@angular/language-service": "~8.2.11", + "@types/node": "~10.14.15", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", - "codelyzer": "^5.0.0", + "@types/jquery": "^3.3.31", + "codelyzer": "~5.1.0", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.1.0", @@ -40,11 +43,11 @@ "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.0", - "ng-packagr": "^5.1.0", + "ng-packagr": "^5.7.1", "protractor": "~5.4.0", - "ts-node": "~7.0.0", + "ts-node": "~8.3.0", "tsickle": "^0.35.0", - "tslint": "~5.15.0", - "typescript": "~3.4.3" + "tslint": "~5.18.0", + "typescript": "~3.5.3" } } diff --git a/projects/ngx-flowchart/package.json b/projects/ngx-flowchart/package.json index 5f4d235..6d632af 100644 --- a/projects/ngx-flowchart/package.json +++ b/projects/ngx-flowchart/package.json @@ -3,6 +3,11 @@ "version": "0.0.1", "peerDependencies": { "@angular/common": "^8.0.3", - "@angular/core": "^8.0.3" + "@angular/core": "^8.0.3", + "jquery": "^3.4.1", + "typescript": "^3.1" + }, + "devDependencies": { + "@types/jquery": "^3.3.31" } -} \ No newline at end of file +} diff --git a/projects/ngx-flowchart/src/lib/connector.directive.ts b/projects/ngx-flowchart/src/lib/connector.directive.ts new file mode 100644 index 0000000..428256d --- /dev/null +++ b/projects/ngx-flowchart/src/lib/connector.directive.ts @@ -0,0 +1,103 @@ +import { Directive, ElementRef, HostListener, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; +import { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; + +@Directive({ + // tslint:disable-next-line:directive-selector + selector: '[fc-connector]' +}) +export class FcConnectorDirective implements OnInit, OnChanges { + + @Input() + callbacks: FcCallbacks; + + @Input() + modelservice: FcModelService; + + @Input() + connector: FcConnector; + + @Input() + mouseOverConnector: FcConnector; + + constructor(public elementRef: ElementRef) { + } + + ngOnInit(): void { + const element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.connectorClass); + if (this.modelservice.isEditable()) { + element.attr('draggable', 'true'); + this.updateConnectorClass(); + } + this.modelservice.connectors.setHtmlElement(this.connector.id, element[0]); + } + + ngOnChanges(changes: SimpleChanges): void { + let updateConnector = false; + for (const propName of Object.keys(changes)) { + const change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (propName === 'mouseOverConnector') { + updateConnector = true; + } + } + } + if (updateConnector && this.modelservice.isEditable()) { + this.updateConnectorClass(); + } + } + + private updateConnectorClass() { + const element = $(this.elementRef.nativeElement); + if (this.connector === this.mouseOverConnector) { + element.addClass(FlowchartConstants.hoverClass); + } else { + element.removeClass(FlowchartConstants.hoverClass); + } + } + + @HostListener('dragover', ['$event']) + dragover(event: DragEvent) { + // Skip - conflict with magnet + /* if (this.modelservice.isEditable()) { + return this.callbacks.edgeDragoverConnector(event, this.connector); + }*/ + } + + @HostListener('drop', ['$event']) + drop(event: DragEvent) { + if (this.modelservice.isEditable()) { + return this.callbacks.edgeDrop(event, this.connector); + } + } + + @HostListener('dragend', ['$event']) + dragend(event: DragEvent) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragend(event); + } + } + + @HostListener('dragstart', ['$event']) + dragstart(event: DragEvent) { + if (this.modelservice.isEditable()) { + this.callbacks.edgeDragstart(event, this.connector); + } + } + + @HostListener('mouseenter', ['$event']) + mouseenter(event: MouseEvent) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseEnter(event, this.connector); + } + } + + @HostListener('mouseleave', ['$event']) + mouseleave(event: MouseEvent) { + if (this.modelservice.isEditable()) { + this.callbacks.connectorMouseLeave(event, this.connector); + } + } + +} diff --git a/projects/ngx-flowchart/src/lib/default-node.component.html b/projects/ngx-flowchart/src/lib/default-node.component.html new file mode 100644 index 0000000..6c6a3c8 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/default-node.component.html @@ -0,0 +1,32 @@ +
+
+
+

{{ node.name }}

+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ × +
+
diff --git a/projects/ngx-flowchart/src/lib/default-node.component.scss b/projects/ngx-flowchart/src/lib/default-node.component.scss new file mode 100644 index 0000000..30e471e --- /dev/null +++ b/projects/ngx-flowchart/src/lib/default-node.component.scss @@ -0,0 +1,40 @@ +:host { + + .fc-node-overlay { + position: absolute; + pointer-events: none; + left: 0; + top: 0; + right: 0; + bottom: 0; + background-color: #000; + opacity: 0; + } + + :host-context(.fc-hover) .fc-node-overlay { + opacity: 0.25; + transition: opacity .2s; + } + + :host-context(.fc-selected) .fc-node-overlay { + opacity: 0.25; + } + + .innerNode { + display: flex; + justify-content: center; + align-items: center; + min-width: 100px; + border-radius: 5px; + + background-color: #F15B26; + color: #fff; + font-size: 16px; + pointer-events: none; + + p { + padding: 0 15px; + text-align: center; + } + } +} diff --git a/projects/ngx-flowchart/src/lib/default-node.component.ts b/projects/ngx-flowchart/src/lib/default-node.component.ts new file mode 100644 index 0000000..238d457 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/default-node.component.ts @@ -0,0 +1,15 @@ +import { Component } from '@angular/core'; +import { FcNodeComponent } from './node.component'; + +@Component({ + selector: 'fc-default-node', + templateUrl: './default-node.component.html', + styleUrls: ['./default-node.component.scss'] +}) +export class DefaultFcNodeComponent extends FcNodeComponent { + + constructor() { + super(); + } + +} diff --git a/projects/ngx-flowchart/src/lib/edge-dragging.service.ts b/projects/ngx-flowchart/src/lib/edge-dragging.service.ts new file mode 100644 index 0000000..7220b3e --- /dev/null +++ b/projects/ngx-flowchart/src/lib/edge-dragging.service.ts @@ -0,0 +1,278 @@ +import { FcModelService } from './model.service'; +import { FcConnector, FcCoords, FcEdge, FcModel, FlowchartConstants, ModelvalidationError } from './ngx-flowchart.models'; +import { FcEdgeDrawingService } from './edge-drawing.service'; +import { FcModelValidationService } from './modelvalidation.service'; + +export class FcEdgeDraggingService { + + edgeDragging: EdgeDragging = { + isDragging: false, + dragPoint1: null, + dragPoint2: null, + shadowDragStarted: false + }; + + private draggedEdgeSource: FcConnector = null; + private dragOffset: FcCoords = {}; + private destinationHtmlElement: HTMLElement = null; + private oldDisplayStyle = ''; + + private readonly modelValidation: FcModelValidationService; + private readonly edgeDrawingService: FcEdgeDrawingService; + private readonly modelService: FcModelService; + private readonly model: FcModel; + private readonly isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean; + private readonly applyFunction: (fn: (...args: any[]) => T) => T; + private readonly dragAnimation: string; + private readonly edgeStyle: string; + + constructor(modelValidation: FcModelValidationService, + edgeDrawingService: FcEdgeDrawingService, + modelService: FcModelService, + model: FcModel, + isValidEdgeCallback: (source: FcConnector, destination: FcConnector) => boolean, + applyFunction: (fn: (...args: any[]) => T) => T, + dragAnimation: string, + edgeStyle: string) { + this.modelValidation = modelValidation; + this.edgeDrawingService = edgeDrawingService; + this.modelService = modelService; + this.model = model; + this.isValidEdgeCallback = isValidEdgeCallback || (() => true); + this.applyFunction = applyFunction; + this.dragAnimation = dragAnimation; + this.edgeStyle = edgeStyle; + } + + public dragstart(event: DragEvent, connector: FcConnector) { + let swapConnector: FcConnector; + let dragLabel: string; + let prevEdge: FcEdge; + if (connector.type === FlowchartConstants.leftConnectorType) { + for (const edge of this.model.edges) { + if (edge === connector.id) { + swapConnector = this.modelService.connectors.getConnector(edge.source); + dragLabel = edge.label; + prevEdge = edge; + this.applyFunction(() => { + this.modelService.edges.delete(edge); + }); + break; + } + } + } + this.edgeDragging.isDragging = true; + if (swapConnector !== undefined) { + this.draggedEdgeSource = swapConnector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(swapConnector.id); + this.edgeDragging.dragLabel = dragLabel; + this.edgeDragging.prevEdge = prevEdge; + } else { + this.draggedEdgeSource = connector; + this.edgeDragging.dragPoint1 = this.modelService.connectors.getCenteredCoord(connector.id); + } + const canvas = this.modelService.canvasHtmlElement; + if (!canvas) { + throw new Error('No canvas while edgedraggingService found.'); + } + this.dragOffset.x = -canvas.getBoundingClientRect().left; + this.dragOffset.y = -canvas.getBoundingClientRect().top; + + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + const originalEvent: DragEvent = (event as any).originalEvent || event; + + originalEvent.dataTransfer.setData('Text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } else { + this.destinationHtmlElement = event.target as HTMLElement; + this.oldDisplayStyle = this.destinationHtmlElement.style.display; + this.destinationHtmlElement.style.display = 'none'; + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.shadowDragStarted = true; + } + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.edgeDragging.gElement === undefined) { + this.edgeDragging.gElement = $(document.querySelectorAll('.shadow-svg-class')); + this.edgeDragging.pathElement = $(document.querySelectorAll('.shadow-svg-class')).find('path'); + this.edgeDragging.circleElement = $(document.querySelectorAll('.shadow-svg-class')).find('circle'); + } + + this.edgeDragging.gElement.css('display', 'block'); + this.edgeDragging.pathElement.attr('d', + this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + } + event.stopPropagation(); + } + + public dragover(event: DragEvent) { + if (this.edgeDragging.isDragging) { + if (!this.edgeDragging.magnetActive && this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.destinationHtmlElement !== null) { + this.destinationHtmlElement.style.display = this.oldDisplayStyle; + } + + if (this.edgeDragging.shadowDragStarted) { + this.applyFunction(() => { + this.edgeDragging.shadowDragStarted = false; + }); + } + + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + + this.edgeDragging.pathElement.attr('d', + this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + + } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction(() => { + if (this.destinationHtmlElement !== null) { + this.destinationHtmlElement.style.display = this.oldDisplayStyle; + } + + this.edgeDragging.dragPoint2 = { + x: event.clientX + this.dragOffset.x, + y: event.clientY + this.dragOffset.y + }; + }); + } + } + } + + public dragoverConnector(event: DragEvent, connector: FcConnector): boolean { + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + event.preventDefault(); + event.stopPropagation(); + return false; + } + } + } + + public dragleaveMagnet(event: DragEvent) { + this.edgeDragging.magnetActive = false; + } + + public dragoverMagnet(event: DragEvent, connector: FcConnector): boolean { + if (this.edgeDragging.isDragging) { + this.dragover(event); + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: connector.id + }]), this.model.nodes); + } catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } else { + throw error; + } + } + if (this.isValidEdgeCallback(this.draggedEdgeSource, connector)) { + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + + this.edgeDragging.magnetActive = true; + + this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id); + this.edgeDragging.pathElement.attr('d', + this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1, this.edgeDragging.dragPoint2, this.edgeStyle)); + this.edgeDragging.circleElement.attr('cx', this.edgeDragging.dragPoint2.x); + this.edgeDragging.circleElement.attr('cy', this.edgeDragging.dragPoint2.y); + + event.preventDefault(); + event.stopPropagation(); + return false; + } else if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + return this.applyFunction(() => { + this.edgeDragging.dragPoint2 = this.modelService.connectors.getCenteredCoord(connector.id); + event.preventDefault(); + event.stopPropagation(); + return false; + }); + } + } + } + } + + public dragend(event: DragEvent) { + if (this.edgeDragging.isDragging) { + this.edgeDragging.isDragging = false; + this.edgeDragging.dragPoint1 = null; + this.edgeDragging.dragPoint2 = null; + this.edgeDragging.dragLabel = null; + event.stopPropagation(); + + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.edgeDragging.gElement.css('display', 'none'); + } + if (this.edgeDragging.prevEdge) { + const edge = this.edgeDragging.prevEdge; + this.edgeDragging.prevEdge = null; + this.applyFunction(() => { + this.modelService.edges.putEdge(edge); + }); + } + } + } + + public drop(event: DragEvent, targetConnector: FcConnector): boolean { + if (this.edgeDragging.isDragging) { + try { + this.modelValidation.validateEdges(this.model.edges.concat([{ + source: this.draggedEdgeSource.id, + destination: targetConnector.id + }]), this.model.nodes); + } catch (error) { + if (error instanceof ModelvalidationError) { + return true; + } else { + throw error; + } + } + + if (this.isValidEdgeCallback(this.draggedEdgeSource, targetConnector)) { + this.edgeDragging.prevEdge = null; + this.modelService.edges._addEdge(event, this.draggedEdgeSource, targetConnector, this.edgeDragging.dragLabel); + event.stopPropagation(); + event.preventDefault(); + return false; + } + } + } +} + +export interface EdgeDragging { + isDragging: boolean; + shadowDragStarted: boolean; + dragPoint1: FcCoords; + dragPoint2: FcCoords; + dragLabel?: string; + prevEdge?: FcEdge; + magnetActive?: boolean; + gElement?: JQuery; + pathElement?: JQuery; + circleElement?: JQuery; +} diff --git a/projects/ngx-flowchart/src/lib/edge-drawing.service.ts b/projects/ngx-flowchart/src/lib/edge-drawing.service.ts new file mode 100644 index 0000000..6901583 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/edge-drawing.service.ts @@ -0,0 +1,47 @@ +import { Injectable } from '@angular/core'; +import { FcCoords, FlowchartConstants } from './ngx-flowchart.models'; + +@Injectable() +export class FcEdgeDrawingService { + + constructor() { + } + + public getEdgeDAttribute(pt1: FcCoords, pt2: FcCoords, style: string): string { + let dAddribute = `M ${pt1.x}, ${pt1.y} `; + if (style === FlowchartConstants.curvedStyle) { + const sourceTangent = this.computeEdgeSourceTangent(pt1, pt2); + const destinationTangent = this.computeEdgeDestinationTangent(pt1, pt2); + dAddribute += `C ${sourceTangent.x}, ${sourceTangent.y} ${(destinationTangent.x - 50)}, ${destinationTangent.y} ${pt2.x}, ${pt2.y}`; + } else { + dAddribute += `L ${pt2.x}, ${pt2.y}`; + } + return dAddribute; + } + + public getEdgeCenter(pt1: FcCoords, pt2: FcCoords): FcCoords { + return { + x: (pt1.x + pt2.x) / 2, + y: (pt1.y + pt2.y) / 2 + }; + } + + private computeEdgeTangentOffset(pt1: FcCoords, pt2: FcCoords): number { + return (pt2.y - pt1.y) / 2; + } + + private computeEdgeSourceTangent(pt1: FcCoords, pt2: FcCoords): FcCoords { + return { + x: pt1.x, + y: pt1.y + this.computeEdgeTangentOffset(pt1, pt2) + }; + } + + private computeEdgeDestinationTangent(pt1: FcCoords, pt2: FcCoords): FcCoords { + return { + x: pt2.x, + y: pt2.y - this.computeEdgeTangentOffset(pt1, pt2) + }; + } + +} diff --git a/projects/ngx-flowchart/src/lib/magnet.directive.ts b/projects/ngx-flowchart/src/lib/magnet.directive.ts new file mode 100644 index 0000000..89aabd4 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/magnet.directive.ts @@ -0,0 +1,44 @@ +import { Directive, ElementRef, HostListener, Input, OnInit } from '@angular/core'; +import { FcCallbacks, FcConnector, FlowchartConstants } from './ngx-flowchart.models'; + +@Directive({ + // tslint:disable-next-line:directive-selector + selector: '[fc-magnet]' +}) +export class FcMagnetDirective implements OnInit { + + @Input() + callbacks: FcCallbacks; + + @Input() + connector: FcConnector; + + constructor(public elementRef: ElementRef) { + } + + ngOnInit(): void { + const element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.magnetClass); + } + + @HostListener('dragover', ['$event']) + dragover(event: DragEvent) { + return this.callbacks.edgeDragoverMagnet(event, this.connector); + } + + @HostListener('dragleave', ['$event']) + dragleave(event: DragEvent) { + this.callbacks.edgeDragleaveMagnet(event); + } + + @HostListener('drop', ['$event']) + drop(event: DragEvent) { + return this.callbacks.edgeDrop(event, this.connector); + } + + @HostListener('dragend', ['$event']) + dragend(event: DragEvent) { + this.callbacks.edgeDragend(event); + } + +} diff --git a/projects/ngx-flowchart/src/lib/model.service.ts b/projects/ngx-flowchart/src/lib/model.service.ts new file mode 100644 index 0000000..2ac8fb6 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/model.service.ts @@ -0,0 +1,489 @@ +import { FcModelValidationService } from './modelvalidation.service'; +import { FcConnector, FcCoords, FcEdge, FcItemInfo, FcModel, FcNode, FcRectBox } from './ngx-flowchart.models'; +import { Observable, of } from 'rxjs'; +import { ChangeDetectorRef } from '@angular/core'; + +export class FcModelService { + + modelValidation: FcModelValidationService; + model: FcModel; + cd: ChangeDetectorRef; + selectedObjects: any[]; + + connectorsHtmlElements: HtmlElementMap = {}; + nodesHtmlElements: HtmlElementMap = {}; + canvasHtmlElement: HTMLElement = null; + dragImage: HTMLImageElement = null; + svgHtmlElement: SVGElement = null; + + dropNode: (event: Event, node: FcNode) => void; + createEdge: (event: Event, edge: FcEdge) => Observable; + edgeAddedCallback: (edge: FcEdge) => void; + nodeRemovedCallback: (node: FcNode) => void; + edgeRemovedCallback: (edge: FcEdge) => void; + + dropTargetId: string; + + connectors: ConnectorsModel; + nodes: NodesModel; + edges: EdgesModel; + + constructor(modelValidation: FcModelValidationService, + model: FcModel, + cd: ChangeDetectorRef, + selectedObjects: any[], + dropNode: (event: Event, node: FcNode) => void, + createEdge: (event: Event, edge: FcEdge) => Observable, + edgeAddedCallback: (edge: FcEdge) => void, + nodeRemovedCallback: (node: FcNode) => void, + edgeRemovedCallback: (edge: FcEdge) => void, + canvasHtmlElement: HTMLElement, + svgHtmlElement: SVGElement) { + + this.modelValidation = modelValidation; + this.model = model; + this.cd = cd; + this.canvasHtmlElement = canvasHtmlElement; + this.svgHtmlElement = svgHtmlElement; + this.modelValidation.validateModel(this.model); + this.selectedObjects = selectedObjects; + + this.dropNode = dropNode || (() => {}); + this.createEdge = createEdge || (() => of({label: 'label'})); + this.edgeAddedCallback = edgeAddedCallback || (() => {}); + this.nodeRemovedCallback = nodeRemovedCallback || (() => {}); + this.edgeRemovedCallback = edgeRemovedCallback || (() => {}); + + this.connectors = new ConnectorsModel(this); + this.nodes = new NodesModel(this); + this.edges = new EdgesModel(this); + } + + public detectChanges() { + setTimeout(() => { + this.cd.detectChanges(); + }, 0); + } + + public selectObject(object: any) { + if (this.isEditable()) { + if (this.selectedObjects.indexOf(object) === -1) { + this.selectedObjects.push(object); + } + } + } + + public deselectObject(object: any) { + if (this.isEditable()) { + const index = this.selectedObjects.indexOf(object); + if (index === -1) { + throw new Error('Tried to deselect an unselected object'); + } + this.selectedObjects.splice(index, 1); + } + } + + public toggleSelectedObject(object: any) { + if (this.isSelectedObject(object)) { + this.deselectObject(object); + } else { + this.selectObject(object); + } + } + + public isSelectedObject(object: any): boolean { + return this.selectedObjects.indexOf(object) !== -1; + } + + public selectAll() { + this.model.nodes.forEach(node => { + if (!node.readonly) { + this.nodes.select(node); + } + }); + this.model.edges.forEach(edge => { + this.edges.select(edge); + }); + this.detectChanges(); + } + + public deselectAll() { + this.selectedObjects.splice(0, this.selectedObjects.length); + this.detectChanges(); + } + + public isEditObject(object: any): boolean { + return this.selectedObjects.length === 1 && + this.selectedObjects.indexOf(object) !== -1; + } + + private inRectBox(x: number, y: number, rectBox: FcRectBox): boolean { + return x >= rectBox.left && x <= rectBox.right && + y >= rectBox.top && y <= rectBox.bottom; + } + + public getItemInfoAtPoint(x: number, y: number): FcItemInfo { + return { + node: this.getNodeAtPoint(x, y), + edge: this.getEdgeAtPoint(x, y) + }; + } + + public getNodeAtPoint(x: number, y: number): FcNode { + for (const node of this.model.nodes) { + const element = this.nodes.getHtmlElement(node.id); + const nodeElementBox = element.getBoundingClientRect(); + if (x >= nodeElementBox.left && x <= nodeElementBox.right + && y >= nodeElementBox.top && y <= nodeElementBox.bottom) { + return node; + } + } + return null; + } + + public getEdgeAtPoint(x: number, y: number): FcEdge { + const element = document.elementFromPoint(x, y); + const id = element.id; + let edgeIndex = -1; + if (id) { + if (id.startsWith('fc-edge-path-')) { + edgeIndex = Number(id.substring('fc-edge-path-'.length)); + } else if (id.startsWith('fc-edge-label-')) { + edgeIndex = Number(id.substring('fc-edge-label-'.length)); + } + } + if (edgeIndex > -1) { + return this.model.edges[edgeIndex]; + } + return null; + } + + public selectAllInRect(rectBox: FcRectBox) { + this.model.nodes.forEach((value) => { + const element = this.nodes.getHtmlElement(value.id); + const nodeElementBox = element.getBoundingClientRect(); + if (!value.readonly) { + const x = nodeElementBox.left + nodeElementBox.width / 2; + const y = nodeElementBox.top + nodeElementBox.height / 2; + if (this.inRectBox(x, y, rectBox)) { + this.nodes.select(value); + } else { + if (this.nodes.isSelected(value)) { + this.nodes.deselect(value); + } + } + } + }); + const canvasElementBox = this.canvasHtmlElement.getBoundingClientRect(); + this.model.edges.forEach((value) => { + const start = this.edges.sourceCoord(value); + const end = this.edges.destCoord(value); + const x = (start.x + end.x) / 2 + canvasElementBox.left; + const y = (start.y + end.y) / 2 + canvasElementBox.top; + if (this.inRectBox(x, y, rectBox)) { + this.edges.select(value); + } else { + if (this.edges.isSelected(value)) { + this.edges.deselect(value); + } + } + }); + } + + public deleteSelected() { + const edgesToDelete = this.edges.getSelectedEdges(); + edgesToDelete.forEach((edge) => { + this.edges.delete(edge); + }); + const nodesToDelete = this.nodes.getSelectedNodes(); + nodesToDelete.forEach((node) => { + this.nodes.delete(node); + }); + } + + public isEditable(): boolean { + return this.dropTargetId === undefined; + } + + public isDropSource(): boolean { + return this.dropTargetId !== undefined; + } + + public getDragImage(): HTMLImageElement { + if (!this.dragImage) { + this.dragImage = new Image(); + this.dragImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + this.dragImage.style.visibility = 'hidden'; + } + return this.dragImage; + } + + public registerCallbacks(edgeAddedCallback: (edge: FcEdge) => void, + nodeRemovedCallback: (node: FcNode) => void, + edgeRemovedCallback: (edge: FcEdge) => void) { + this.edgeAddedCallback = edgeAddedCallback; + this.nodeRemovedCallback = nodeRemovedCallback; + this.edgeRemovedCallback = edgeRemovedCallback; + } + +} + +interface HtmlElementMap { [id: string]: HTMLElement; } + +abstract class AbstractFcModel { + + modelService: FcModelService; + + protected constructor(modelService: FcModelService) { + this.modelService = modelService; + } + + public select(object: T) { + this.modelService.selectObject(object); + } + + public deselect(object: T) { + this.modelService.deselectObject(object); + } + + public toggleSelected(object: T) { + this.modelService.toggleSelectedObject(object); + } + + public isSelected(object: T): boolean { + return this.modelService.isSelectedObject(object); + } + + public isEdit(object: T): boolean { + return this.modelService.isEditObject(object); + } +} + +class ConnectorsModel extends AbstractFcModel { + + constructor(modelService: FcModelService) { + super(modelService); + } + + public getConnector(connectorId: string): FcConnector { + const model = this.modelService.model; + for (const node of model.nodes) { + for (const connector of node.connectors) { + if (connector.id === connectorId) { + return connector; + } + } + } + } + + public getHtmlElement(connectorId: string): HTMLElement { + return this.modelService.connectorsHtmlElements[connectorId]; + } + + public setHtmlElement(connectorId: string, element: HTMLElement) { + this.modelService.connectorsHtmlElements[connectorId] = element; + this.modelService.detectChanges(); + } + + private _getCoords(connectorId: string, centered?: boolean): FcCoords { + const element = this.getHtmlElement(connectorId); + const canvas = this.modelService.canvasHtmlElement; + if (element === null || element === undefined || canvas === null) { + return {x: 0, y: 0}; + } + const connectorElementBox = element.getBoundingClientRect(); + const canvasElementBox = canvas.getBoundingClientRect(); + let coords: FcCoords = { + x: connectorElementBox.left - canvasElementBox.left, + y: connectorElementBox.top - canvasElementBox.top + }; + if (centered) { + coords = { + x: Math.round(coords.x + element.offsetWidth / 2), + y: Math.round(coords.y + element.offsetHeight / 2) + }; + } + return coords; + } + + public getCoords(connectorId: string): FcCoords { + return this._getCoords(connectorId, false); + } + + public getCenteredCoord(connectorId: string): FcCoords { + return this._getCoords(connectorId, true); + } +} + +class NodesModel extends AbstractFcModel { + + constructor(modelService: FcModelService) { + super(modelService); + } + + public getConnectorsByType(node: FcNode, type: string): Array { + return node.connectors.filter((connector) => { + return connector.type === type; + }); + } + + private _addConnector(node: FcNode, connector: FcConnector) { + node.connectors.push(connector); + try { + this.modelService.modelValidation.validateNode(node); + } catch (error) { + node.connectors.splice(node.connectors.indexOf(connector), 1); + throw error; + } + } + + public delete(node: FcNode) { + if (this.isSelected(node)) { + this.deselect(node); + } + const model = this.modelService.model; + const index = model.nodes.indexOf(node); + if (index === -1) { + if (node === undefined) { + throw new Error('Passed undefined'); + } + throw new Error('Tried to delete not existing node'); + } + const connectorIds = this.getConnectorIds(node); + for (let i = 0; i < model.edges.length; i++) { + const edge = model.edges[i]; + if (connectorIds.indexOf(edge.source) !== -1 || connectorIds.indexOf(edge.destination) !== -1) { + this.modelService.edges.delete(edge); + i--; + } + } + model.nodes.splice(index, 1); + this.modelService.nodeRemovedCallback(node); + } + + public getSelectedNodes(): Array { + const model = this.modelService.model; + return model.nodes.filter((node) => { + return this.modelService.nodes.isSelected(node); + }); + } + + public handleClicked(node: FcNode, ctrlKey?: boolean) { + if (ctrlKey) { + this.modelService.nodes.toggleSelected(node); + } else { + this.modelService.deselectAll(); + this.modelService.nodes.select(node); + } + } + + private _addNode(node: FcNode) { + const model = this.modelService.model; + try { + model.nodes.push(node); + this.modelService.modelValidation.validateNodes(model.nodes); + } catch (error) { + model.nodes.splice(model.nodes.indexOf(node), 1); + throw error; + } + } + + public getConnectorIds(node: FcNode): Array { + return node.connectors.map((connector) => { + return connector.id; + }); + } + + public getNodeByConnectorId(connectorId: string): FcNode { + const model = this.modelService.model; + for (const node of model.nodes) { + const connectorIds = this.getConnectorIds(node); + if (connectorIds.indexOf(connectorId) > -1) { + return node; + } + } + return null; + } + + public getHtmlElement(nodeId: string): HTMLElement { + return this.modelService.nodesHtmlElements[nodeId]; + } + + public setHtmlElement(nodeId: string, element: HTMLElement) { + this.modelService.nodesHtmlElements[nodeId] = element; + this.modelService.detectChanges(); + } + +} + +class EdgesModel extends AbstractFcModel { + + constructor(modelService: FcModelService) { + super(modelService); + } + + public ready(edge: FcEdge): boolean { + const source = this.modelService.connectors.getHtmlElement(edge.source); + const destination = this.modelService.connectors.getHtmlElement(edge.destination); + return source !== undefined && destination !== undefined; + } + + public sourceCoord(edge: FcEdge): FcCoords { + return this.modelService.connectors.getCenteredCoord(edge.source); + } + + public destCoord(edge: FcEdge): FcCoords { + return this.modelService.connectors.getCenteredCoord(edge.destination); + } + + public delete(edge: FcEdge) { + const model = this.modelService.model; + const index = model.edges.indexOf(edge); + if (index === -1) { + throw new Error('Tried to delete not existing edge'); + } + if (this.isSelected(edge)) { + this.deselect(edge); + } + model.edges.splice(index, 1); + this.modelService.edgeRemovedCallback(edge); + } + + public getSelectedEdges(): Array { + const model = this.modelService.model; + return model.edges.filter((edge) => { + return this.modelService.edges.isSelected(edge); + }); + } + + public handleEdgeMouseClick(edge: FcEdge, ctrlKey?: boolean) { + if (ctrlKey) { + this.modelService.edges.toggleSelected(edge); + } else { + this.modelService.deselectAll(); + this.modelService.edges.select(edge); + } + } + + public putEdge(edge: FcEdge) { + const model = this.modelService.model; + model.edges.push(edge); + } + + public _addEdge(event: Event, sourceConnector: FcConnector, destConnector: FcConnector, label: string) { + this.modelService.modelValidation.validateConnector(sourceConnector); + this.modelService.modelValidation.validateConnector(destConnector); + const edge: FcEdge = {}; + edge.source = sourceConnector.id; + edge.destination = destConnector.id; + edge.label = label; + const model = this.modelService.model; + this.modelService.modelValidation.validateEdges(model.edges.concat([edge]), model.nodes); + this.modelService.createEdge(event, edge).subscribe( + (created) => { + model.edges.push(created); + this.modelService.edgeAddedCallback(created); + } + ); + } +} diff --git a/projects/ngx-flowchart/src/lib/modelvalidation.service.ts b/projects/ngx-flowchart/src/lib/modelvalidation.service.ts new file mode 100644 index 0000000..00116c4 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/modelvalidation.service.ts @@ -0,0 +1,122 @@ +import { Injectable } from '@angular/core'; +import { FcConnector, FcEdge, FcModel, FcNode, fcTopSort, ModelvalidationError } from './ngx-flowchart.models'; + +@Injectable() +export class FcModelValidationService { + + constructor() { } + + public validateModel(model: FcModel): FcModel { + this.validateNodes(model.nodes); + this._validateEdges(model.edges, model.nodes); + return model; + } + + public validateNodes(nodes: Array): Array { + const ids: string[] = []; + nodes.forEach((node) => { + this.validateNode(node); + if (ids.indexOf(node.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + ids.push(node.id); + }); + const connectorIds: string[] = []; + nodes.forEach((node) => { + node.connectors.forEach((connector) => { + if (connectorIds.indexOf(connector.id) !== -1) { + throw new ModelvalidationError('Id not unique.'); + } + connectorIds.push(connector.id); + }); + }); + return nodes; + } + + public validateNode(node: FcNode): FcNode { + if (node.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (typeof node.name !== 'string') { + throw new ModelvalidationError('Name not valid.'); + } + if (typeof node.x !== 'number' || node.x < 0 || Math.round(node.x) !== node.x) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (typeof node.y !== 'number' || node.y < 0 || Math.round(node.y) !== node.y) { + throw new ModelvalidationError('Coordinates not valid.'); + } + if (!Array.isArray(node.connectors)) { + throw new ModelvalidationError('Connectors not valid.'); + } + node.connectors.forEach((connector) => { + this.validateConnector(connector); + }); + return node; + } + + private _validateEdges(edges: Array, nodes: Array): Array { + edges.forEach((edge) => { + this._validateEdge(edge, nodes); + }); + edges.forEach((edge1, index1) => { + edges.forEach((edge2, index2) => { + if (index1 !== index2) { + if ((edge1.source === edge2.source && edge1.destination === edge2.destination) || + (edge1.source === edge2.destination && edge1.destination === edge2.source)) { + throw new ModelvalidationError('Duplicated edge.'); + } + } + }); + }); + if (fcTopSort({nodes, edges}) === null) { + throw new ModelvalidationError('Graph has a circle.'); + } + return edges; + } + + public validateEdges(edges: Array, nodes: Array): Array { + this.validateNodes(nodes); + return this._validateEdges(edges, nodes); + } + + private _validateEdge(edge: FcEdge, nodes: Array): FcEdge { + if (edge.source === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + if (edge.destination === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (edge.source === edge.destination) { + throw new ModelvalidationError('Edge with same source and destination connectors.'); + } + const sourceNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.source))[0]; + if (sourceNode === undefined) { + throw new ModelvalidationError('Source not valid.'); + } + const destinationNode = nodes.filter((node) => node.connectors.some((connector) => connector.id === edge.destination))[0]; + if (destinationNode === undefined) { + throw new ModelvalidationError('Destination not valid.'); + } + if (sourceNode === destinationNode) { + throw new ModelvalidationError('Edge with same source and destination nodes.'); + } + return edge; + } + + public validateEdge(edge: FcEdge, nodes: Array): FcEdge { + this.validateNodes(nodes); + return this._validateEdge(edge, nodes); + } + + public validateConnector(connector: FcConnector): FcConnector { + if (connector.id === undefined) { + throw new ModelvalidationError('Id not valid.'); + } + if (connector.type === undefined || connector.type === null || typeof connector.type !== 'string') { + throw new ModelvalidationError('Type not valid.'); + } + return connector; + } + +} diff --git a/projects/ngx-flowchart/src/lib/mouseover.service.ts b/projects/ngx-flowchart/src/lib/mouseover.service.ts new file mode 100644 index 0000000..409ef9b --- /dev/null +++ b/projects/ngx-flowchart/src/lib/mouseover.service.ts @@ -0,0 +1,54 @@ +import { FcConnector, FcEdge, FcNode } from './ngx-flowchart.models'; + +export class FcMouseOverService { + + mouseoverscope: MouseOverScope = { + connector: null, + edge: null, + node: null + }; + + private readonly applyFunction: (fn: (...args: any[]) => T) => T; + + constructor(applyFunction: (fn: (...args: any[]) => T) => T) { + this.applyFunction = applyFunction; + } + + public nodeMouseOver(event: MouseEvent, node: FcNode) { + return this.applyFunction(() => { + this.mouseoverscope.node = node; + }); + } + + public nodeMouseOut(event: MouseEvent, node: FcNode) { + return this.applyFunction(() => { + this.mouseoverscope.node = null; + }); + } + + public connectorMouseEnter(event: MouseEvent, connector: FcConnector) { + return this.applyFunction(() => { + this.mouseoverscope.connector = connector; + }); + } + + public connectorMouseLeave(event: MouseEvent, connector: FcConnector) { + return this.applyFunction(() => { + this.mouseoverscope.connector = null; + }); + } + + public edgeMouseEnter(event: MouseEvent, edge: FcEdge) { + this.mouseoverscope.edge = edge; + } + + public edgeMouseLeave(event: MouseEvent, edge: FcEdge) { + this.mouseoverscope.edge = null; + } +} + +export interface MouseOverScope { + connector: FcConnector; + edge: FcEdge; + node: FcNode; +} diff --git a/projects/ngx-flowchart/src/lib/ngx-flowchart.component.html b/projects/ngx-flowchart/src/lib/ngx-flowchart.component.html new file mode 100644 index 0000000..b246ce4 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/ngx-flowchart.component.html @@ -0,0 +1,95 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ {{edgeDraggingService.edgeDragging.dragLabel}} +
+
+
+
+
+ +
+
+ × +
+ {{edge.label}} +
+
+ +
diff --git a/projects/ngx-flowchart/src/lib/ngx-flowchart.component.scss b/projects/ngx-flowchart/src/lib/ngx-flowchart.component.scss new file mode 100644 index 0000000..f9db295 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/ngx-flowchart.component.scss @@ -0,0 +1,182 @@ +:host { + display: block; + position: relative; + width: 100%; + height: 100%; + background-size: 25px 25px; + background-image: linear-gradient(to right, rgba(0, 0, 0, .1) 1px, transparent 1px), linear-gradient(to bottom, rgba(0, 0, 0, .1) 1px, transparent 1px); + background-color: transparent; + min-width: 100%; + min-height: 100%; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + .fc-canvas-container { + display: block; + position: relative; + width: 100%; + height: 100%; + svg.fc-canvas-svg { + display: block; + position: relative; + width: 100%; + height: 100%; + } + } + + .fc-edge { + stroke: gray; + stroke-width: 4; + transition: stroke-width .2s; + fill: transparent; + &.fc-hover { + stroke: gray; + stroke-width: 6; + fill: transparent; + } + &.fc-selected { + stroke: red; + stroke-width: 4; + fill: transparent; + } + &.fc-active { + animation: dash 3s linear infinite; + stroke-dasharray: 20; + } + &.fc-dragging { + pointer-events: none; + } + } + + .fc-arrow-marker polygon { + stroke: gray; + fill: gray; + } + + .fc-arrow-marker-selected polygon { + stroke: red; + fill: red; + } + + .edge-endpoint { + fill: gray; + } + + .fc-noselect { + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently + supported by Chrome and Opera */ + } + + .fc-edge-label { + position: absolute; + opacity: 0.8; + transition: transform .2s; + transform-origin: bottom left; + margin: 0 auto; + .fc-edge-label-text { + position: absolute; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + white-space: nowrap; + text-align: center; + font-size: 16px; + span { + cursor: default; + border: solid #ff3d00; + border-radius: 10px; + color: #ff3d00; + background-color: #fff; + padding: 3px 5px; + } + } + .fc-nodeedit { + top: -30px; + right: 14px; + } + .fc-nodedelete { + top: -30px; + right: -13px; + } + &.fc-hover { + transform: scale(1.25); + } + &.fc-selected, + &.fc-edit { + .fc-edge-label-text { + span { + border: solid red; + color: #fff; + font-weight: 600; + background-color: red; + } + } + } + } + + .fc-select-rectangle { + border: 2px dashed #5262ff; + position: absolute; + background: rgba(20,125,255,0.1); + z-index: 2; + } +} + +@keyframes dash { + from { + stroke-dashoffset: 500; + } +} + +:host ::ng-deep { + + .fc-nodeedit { + display: none; + font-size: 15px; + } + + .fc-nodedelete { + display: none; + font-size: 18px; + } + + .fc-edit { + .fc-nodeedit, + .fc-nodedelete { + display: block; + position: absolute; + border: solid 2px #eee; + + border-radius: 50%; + font-weight: 600; + line-height: 20px; + + height: 20px; + padding-top: 2px; + width: 22px; + + background: #494949; + color: #fff; + text-align: center; + vertical-align: bottom; + + cursor: pointer; + } + .fc-nodeedit { + top: -24px; + right: 16px; + } + .fc-nodedelete { + top: -24px; + right: -13px; + } + } +} diff --git a/projects/ngx-flowchart/src/lib/ngx-flowchart.component.spec.ts b/projects/ngx-flowchart/src/lib/ngx-flowchart.component.spec.ts deleted file mode 100644 index 6d3a615..0000000 --- a/projects/ngx-flowchart/src/lib/ngx-flowchart.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { NgxFlowchartComponent } from './ngx-flowchart.component'; - -describe('NgxFlowchartComponent', () => { - let component: NgxFlowchartComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ NgxFlowchartComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(NgxFlowchartComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/projects/ngx-flowchart/src/lib/ngx-flowchart.component.ts b/projects/ngx-flowchart/src/lib/ngx-flowchart.component.ts index 0608e07..c191b25 100644 --- a/projects/ngx-flowchart/src/lib/ngx-flowchart.component.ts +++ b/projects/ngx-flowchart/src/lib/ngx-flowchart.component.ts @@ -1,19 +1,294 @@ -import { Component, OnInit } from '@angular/core'; +import { + ChangeDetectionStrategy, ChangeDetectorRef, + Component, + DoCheck, + ElementRef, + HostBinding, + HostListener, + Input, + IterableDiffer, + IterableDiffers, + NgZone, + OnInit +} from '@angular/core'; +import { FcCallbacks, FcEdge, FcModel, FcNode, FlowchartConstants, UserCallbacks, UserNodeCallbacks } from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; +import { FcModelValidationService } from './modelvalidation.service'; +import { FcNodeDraggingService } from './node-dragging.service'; +import { FcEdgeDrawingService } from './edge-drawing.service'; +import { FcEdgeDraggingService } from './edge-dragging.service'; +import { FcMouseOverService } from './mouseover.service'; +import { FcRectangleSelectService } from './rectangleselect.service'; @Component({ selector: 'fc-canvas', - template: ` -

- ngx-flowchart works! -

- `, - styles: [] + templateUrl: './ngx-flowchart.component.html', + styleUrls: ['./ngx-flowchart.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush }) -export class NgxFlowchartComponent implements OnInit { +export class NgxFlowchartComponent implements OnInit, DoCheck { - constructor() { } + @HostBinding('attr.class') + get canvasClass(): string { + return FlowchartConstants.canvasClass; + } + + @Input() + model: FcModel; + + @Input() + selectedObjects: any[]; + + @Input() + edgeStyle: string; + + @Input() + userCallbacks: UserCallbacks; + + @Input() + automaticResize: boolean; + + @Input() + dragAnimation: string; + + @Input() + nodeWidth: number; + + @Input() + nodeHeight: number; + + @Input() + dropTargetId: string; + + callbacks: FcCallbacks; + + userNodeCallbacks: UserNodeCallbacks; + + modelService: FcModelService; + nodeDraggingService: FcNodeDraggingService; + edgeDraggingService: FcEdgeDraggingService; + mouseoverService: FcMouseOverService; + rectangleSelectService: FcRectangleSelectService; + + arrowDefId: string; + arrowDefIdSelected: string; + + flowchartConstants = FlowchartConstants; + + private nodesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => { + return item; + }); + + private edgesDiffer: IterableDiffer = this.differs.find([]).create((index, item) => { + return item; + }); + + constructor(private elementRef: ElementRef, + private differs: IterableDiffers, + private modelValidation: FcModelValidationService, + public edgeDrawingService: FcEdgeDrawingService, + private cd: ChangeDetectorRef, + private zone: NgZone) { + this.arrowDefId = 'arrow-' + Math.random(); + this.arrowDefIdSelected = this.arrowDefId + '-selected'; + } ngOnInit() { + if (!this.dropTargetId && this.edgeStyle !== FlowchartConstants.curvedStyle && this.edgeStyle !== FlowchartConstants.lineStyle) { + throw new Error('edgeStyle not supported.'); + } + this.nodeHeight = this.nodeHeight || 200; + this.nodeWidth = this.nodeWidth || 200; + this.dragAnimation = this.dragAnimation || FlowchartConstants.dragAnimationRepaint; + this.userCallbacks = this.userCallbacks || {}; + this.automaticResize = this.automaticResize || false; + + for (const key of Object.keys(this.userCallbacks)) { + const callback = this.userCallbacks[key]; + if (typeof callback !== 'function' && key !== 'nodeCallbacks') { + throw new Error('All callbacks should be functions.'); + } + } + + this.userNodeCallbacks = this.userCallbacks.nodeCallbacks; + + const element = $(this.elementRef.nativeElement); + + this.modelService = new FcModelService(this.modelValidation, this.model, this.cd, this.selectedObjects, + this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved, + this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg')); + + if (this.dropTargetId) { + this.modelService.dropTargetId = this.dropTargetId; + } + + const applyFunction = this.zone.run.bind(this.zone); + + this.nodeDraggingService = new FcNodeDraggingService(this.modelService, applyFunction, + this.automaticResize, this.dragAnimation); + + this.edgeDraggingService = new FcEdgeDraggingService(this.modelValidation, this.edgeDrawingService, this.modelService, + this.model, this.userCallbacks.isValidEdge || null, applyFunction, + this.dragAnimation, this.edgeStyle); + + this.mouseoverService = new FcMouseOverService(applyFunction); + + this.rectangleSelectService = new FcRectangleSelectService(this.modelService, + element[0].querySelector('#select-rectangle'), applyFunction); + + this.callbacks = { + nodeDragstart: this.nodeDraggingService.dragstart.bind(this.nodeDraggingService), + nodeDragend: this.nodeDraggingService.dragend.bind(this.nodeDraggingService), + edgeDragstart: this.edgeDraggingService.dragstart.bind(this.edgeDraggingService), + edgeDragend: this.edgeDraggingService.dragend.bind(this.edgeDraggingService), + edgeDrop: this.edgeDraggingService.drop.bind(this.edgeDraggingService), + edgeDragoverConnector: this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService), + edgeDragoverMagnet: this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService), + edgeDragleaveMagnet: this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService), + nodeMouseOver: this.mouseoverService.nodeMouseOver.bind(this.mouseoverService), + nodeMouseOut: this.mouseoverService.nodeMouseOut.bind(this.mouseoverService), + connectorMouseEnter: this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService), + connectorMouseLeave: this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService), + nodeClicked: (event, node) => { + this.modelService.nodes.handleClicked(node, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + } + }; + this.adjustCanvasSize(true); + } + + ngDoCheck(): void { + if (this.model) { + const nodesChange = this.nodesDiffer.diff(this.model.nodes); + const edgesChange = this.edgesDiffer.diff(this.model.edges); + let nodesChanged = false; + let edgesChanged = false; + if (nodesChange !== null) { + nodesChange.forEachAddedItem(() => { + nodesChanged = true; + }); + nodesChange.forEachRemovedItem(() => { + nodesChanged = true; + }); + } + if (edgesChange !== null) { + edgesChange.forEachAddedItem(() => { + edgesChanged = true; + }); + edgesChange.forEachRemovedItem(() => { + edgesChanged = true; + }); + } + if (nodesChanged) { + this.adjustCanvasSize(true); + } + if (nodesChanged || edgesChanged) { + this.cd.detectChanges(); + } + } + } + + getEdgeDAttribute(edge: FcEdge): string { + return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(edge), + this.modelService.edges.destCoord(edge), this.edgeStyle); + } + + public adjustCanvasSize(fit?: boolean) { + let maxX = 0; + let maxY = 0; + const element = $(this.elementRef.nativeElement); + this.model.nodes.forEach((node) => { + maxX = Math.max(node.x + this.nodeWidth, maxX); + maxY = Math.max(node.y + this.nodeHeight, maxY); + }); + let width; + let height; + if (fit) { + width = maxX; + height = maxY; + } else { + width = Math.max(maxX, element.prop('offsetWidth')); + height = Math.max(maxY, element.prop('offsetHeight')); + } + element.css('width', width + 'px'); + element.css('height', height + 'px'); + } + + canvasClick(event: MouseEvent) {} + + edgeMouseDown(event: MouseEvent, edge: FcEdge) { + event.stopPropagation(); + } + + edgeClick(event: MouseEvent, edge: FcEdge) { + this.modelService.edges.handleEdgeMouseClick(edge, event.ctrlKey); + event.stopPropagation(); + event.preventDefault(); + } + + edgeRemove(event: Event, edge: FcEdge) { + this.modelService.edges.delete(edge); + event.stopPropagation(); + event.preventDefault(); + } + + edgeEdit(event: Event, edge: FcEdge) { + if (this.userCallbacks.edgeEdit) { + this.userCallbacks.edgeEdit(event, edge); + } + } + + edgeDoubleClick(event: MouseEvent, edge: FcEdge) { + if (this.userCallbacks.edgeDoubleClick) { + this.userCallbacks.edgeDoubleClick(event, edge); + } + } + + edgeMouseOver(event: MouseEvent, edge: FcEdge) { + if (this.userCallbacks.edgeMouseOver) { + this.userCallbacks.edgeMouseOver(event, edge); + } + } + + edgeMouseEnter(event: MouseEvent, edge: FcEdge) { + this.mouseoverService.edgeMouseEnter(event, edge); + } + + edgeMouseLeave(event: MouseEvent, edge: FcEdge) { + this.mouseoverService.edgeMouseLeave(event, edge); + } + + @HostListener('dragover', ['$event']) + dragover(event: DragEvent) { + this.nodeDraggingService.dragover(event); + this.edgeDraggingService.dragover(event); + } + + @HostListener('drop', ['$event']) + drop(event: DragEvent) { + if (event.preventDefault) { + event.preventDefault(); + } + if (event.stopPropagation) { + event.stopPropagation(); + } + this.nodeDraggingService.drop(event); + } + + @HostListener('mousedown', ['$event']) + mousedown(event: MouseEvent) { + this.rectangleSelectService.mousedown(event); + } + + @HostListener('mousemove', ['$event']) + mousemove(event: MouseEvent) { + this.rectangleSelectService.mousemove(event); + } + + @HostListener('mouseup', ['$event']) + mouseup(event: MouseEvent) { + this.rectangleSelectService.mouseup(event); } } diff --git a/projects/ngx-flowchart/src/lib/ngx-flowchart.models.ts b/projects/ngx-flowchart/src/lib/ngx-flowchart.models.ts new file mode 100644 index 0000000..c277b86 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/ngx-flowchart.models.ts @@ -0,0 +1,191 @@ +import { Observable } from 'rxjs'; +import { InjectionToken, Type } from '@angular/core'; +import { FcNodeComponent } from './node.component'; + +export const FC_NODE_COMPONENT_CONFIG = new InjectionToken('fc-node.component.config'); + +export interface FcNodeComponentConfig { + nodeComponentType: Type; +} + +const htmlPrefix = 'fc'; +const leftConnectorType = 'leftConnector'; +const rightConnectorType = 'rightConnector'; + +export const FlowchartConstants = { + htmlPrefix, + leftConnectorType, + rightConnectorType, + curvedStyle: 'curved', + lineStyle: 'line', + dragAnimationRepaint: 'repaint', + dragAnimationShadow: 'shadow', + canvasClass: htmlPrefix + '-canvas', + selectedClass: htmlPrefix + '-selected', + editClass: htmlPrefix + '-edit', + activeClass: htmlPrefix + '-active', + hoverClass: htmlPrefix + '-hover', + draggingClass: htmlPrefix + '-dragging', + edgeClass: htmlPrefix + '-edge', + edgeLabelClass: htmlPrefix + '-edge-label', + connectorClass: htmlPrefix + '-connector', + magnetClass: htmlPrefix + '-magnet', + nodeClass: htmlPrefix + '-node', + nodeOverlayClass: htmlPrefix + '-node-overlay', + leftConnectorClass: htmlPrefix + '-' + leftConnectorType + 's', + rightConnectorClass: htmlPrefix + '-' + rightConnectorType + 's', + canvasResizeThreshold: 200, + canvasResizeStep: 200 +}; + + +export interface FcCoords { + x?: number; + y?: number; +} + +export interface FcOffset { + top: number; + left: number; +} + +export interface FcRectBox { + top: number; + left: number; + right: number; + bottom: number; +} + +export interface FcConnector { + id: string; + type: string; +} + +export interface FcNode extends FcCoords { + id: string; + name: string; + connectors: Array; + readonly?: boolean; + [key: string]: any; +} + +export interface FcEdge { + label?: string; + source?: string; + destination?: string; + active?: boolean; +} + +export interface FcItemInfo { + node?: FcNode; + edge?: FcEdge; +} + +export interface FcModel { + nodes: Array; + edges: Array; +} + +export interface UserCallbacks { + dropNode?: (event: Event, node: FcNode) => void; + createEdge?: (event: Event, edge: FcEdge) => Observable; + edgeAdded?: (edge: FcEdge) => void; + nodeRemoved?: (node: FcNode) => void; + edgeRemoved?: (edge: FcEdge) => void; + edgeDoubleClick?: (event: MouseEvent, edge: FcEdge) => void; + edgeMouseOver?: (event: MouseEvent, edge: FcEdge) => void; + isValidEdge?: (source: FcConnector, destination: FcConnector) => boolean; + edgeEdit?: (event: Event, edge: FcEdge) => void; + nodeCallbacks?: UserNodeCallbacks; +} + +export interface UserNodeCallbacks { + nodeEdit?: (event: MouseEvent, node: FcNode) => void; + doubleClick?: (event: MouseEvent, node: FcNode) => void; + mouseDown?: (event: MouseEvent, node: FcNode) => void; + mouseEnter?: (event: MouseEvent, node: FcNode) => void; + mouseLeave?: (event: MouseEvent, node: FcNode) => void; +} + +export interface FcCallbacks { + nodeDragstart: (event: DragEvent, node: FcNode) => void; + nodeDragend: (event: DragEvent) => void; + edgeDragstart: (event: DragEvent, connector: FcConnector) => void; + edgeDragend: (event: DragEvent) => void; + edgeDrop: (event: DragEvent, targetConnector: FcConnector) => boolean; + edgeDragoverConnector: (event: DragEvent, connector: FcConnector) => boolean; + edgeDragoverMagnet: (event: DragEvent, connector: FcConnector) => boolean; + edgeDragleaveMagnet: (event: DragEvent) => void; + nodeMouseOver: (event: MouseEvent, node: FcNode) => void; + nodeMouseOut: (event: MouseEvent, node: FcNode) => void; + connectorMouseEnter: (event: MouseEvent, connector: FcConnector) => void; + connectorMouseLeave: (event: MouseEvent, connector: FcConnector) => void; + nodeClicked: (event: MouseEvent, node: FcNode) => void; +} + +export interface FcAdjacentList { + [id: string]: { + incoming: number; + outgoing: Array; + }; +} + +export class ModelvalidationError extends Error { + constructor(message: string) { + super(message); + } +} + +export function fcTopSort(graph: FcModel): Array | null { + const adjacentList: FcAdjacentList = {}; + graph.nodes.forEach((node) => { + adjacentList[node.id] = {incoming: 0, outgoing: []}; + }); + graph.edges.forEach((edge) => { + const sourceNode = graph.nodes.filter((node) => { + return node.connectors.some((connector) => { + return connector.id === edge.source; + }); + })[0]; + const destinationNode = graph.nodes.filter((node) => { + return node.connectors.some((connector) => { + return connector.id === edge.destination; + }); + })[0]; + adjacentList[sourceNode.id].outgoing.push(destinationNode.id); + adjacentList[destinationNode.id].incoming++; + }); + const orderedNodes: string[] = []; + const sourceNodes: string[] = []; + for (const node of Object.keys(adjacentList)) { + const edges = adjacentList[node]; + if (edges.incoming === 0) { + sourceNodes.push(node); + } + } + while (sourceNodes.length !== 0) { + const sourceNode = sourceNodes.pop(); + for (let i = 0; i < adjacentList[sourceNode].outgoing.length; i++) { + const destinationNode = adjacentList[sourceNode].outgoing[i]; + adjacentList[destinationNode].incoming--; + if (adjacentList[destinationNode].incoming === 0) { + sourceNodes.push(destinationNode); + } + adjacentList[sourceNode].outgoing.splice(i, 1); + i--; + } + orderedNodes.push(sourceNode); + } + let hasEdges = false; + for (const node of Object.keys(adjacentList)) { + const edges = adjacentList[node]; + if (edges.incoming !== 0) { + hasEdges = true; + } + } + if (hasEdges) { + return null; + } else { + return orderedNodes; + } +} diff --git a/projects/ngx-flowchart/src/lib/ngx-flowchart.module.ts b/projects/ngx-flowchart/src/lib/ngx-flowchart.module.ts index f6b57ad..1e5d6f3 100644 --- a/projects/ngx-flowchart/src/lib/ngx-flowchart.module.ts +++ b/projects/ngx-flowchart/src/lib/ngx-flowchart.module.ts @@ -1,10 +1,39 @@ import { NgModule } from '@angular/core'; import { NgxFlowchartComponent } from './ngx-flowchart.component'; +import { FcModelValidationService } from './modelvalidation.service'; +import { FcEdgeDrawingService } from './edge-drawing.service'; +import { CommonModule } from '@angular/common'; +import { FcMagnetDirective } from './magnet.directive'; +import { FcConnectorDirective } from './connector.directive'; +import { FcNodeContainerComponent } from './node.component'; +import { FC_NODE_COMPONENT_CONFIG } from './ngx-flowchart.models'; +import { DefaultFcNodeComponent } from './default-node.component'; @NgModule({ - declarations: [NgxFlowchartComponent], + entryComponents: [ + DefaultFcNodeComponent + ], + declarations: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + FcNodeContainerComponent, + DefaultFcNodeComponent], + providers: [ + FcModelValidationService, + FcEdgeDrawingService, + { + provide: FC_NODE_COMPONENT_CONFIG, + useValue: { + nodeComponentType: DefaultFcNodeComponent + } + } + ], imports: [ + CommonModule ], - exports: [NgxFlowchartComponent] + exports: [NgxFlowchartComponent, + FcMagnetDirective, + FcConnectorDirective, + DefaultFcNodeComponent] }) export class NgxFlowchartModule { } diff --git a/projects/ngx-flowchart/src/lib/ngx-flowchart.service.spec.ts b/projects/ngx-flowchart/src/lib/ngx-flowchart.service.spec.ts deleted file mode 100644 index fda35df..0000000 --- a/projects/ngx-flowchart/src/lib/ngx-flowchart.service.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { NgxFlowchartService } from './ngx-flowchart.service'; - -describe('NgxFlowchartService', () => { - beforeEach(() => TestBed.configureTestingModule({})); - - it('should be created', () => { - const service: NgxFlowchartService = TestBed.get(NgxFlowchartService); - expect(service).toBeTruthy(); - }); -}); diff --git a/projects/ngx-flowchart/src/lib/ngx-flowchart.service.ts b/projects/ngx-flowchart/src/lib/ngx-flowchart.service.ts deleted file mode 100644 index 204100d..0000000 --- a/projects/ngx-flowchart/src/lib/ngx-flowchart.service.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class NgxFlowchartService { - - constructor() { } -} diff --git a/projects/ngx-flowchart/src/lib/node-dragging.service.ts b/projects/ngx-flowchart/src/lib/node-dragging.service.ts new file mode 100644 index 0000000..30d2b50 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/node-dragging.service.ts @@ -0,0 +1,326 @@ +import { FcModelService } from './model.service'; +import { FcCoords, FcNode, FlowchartConstants } from './ngx-flowchart.models'; + +const nodeDropScope: NodeDropScope = { + dropElement: null +}; + +export class FcNodeDraggingService { + + nodeDraggingScope: NodeDraggingScope = { + shadowDragStarted: false, + dropElement: null, + draggedNodes: [], + shadowElements: [] + }; + + private dragOffsets: FcCoords[] = []; + private draggedElements: HTMLElement[] = []; + + private destinationHtmlElements: HTMLElement[] = []; + private oldDisplayStyles: string[] = []; + + private readonly modelService: FcModelService; + private readonly automaticResize: boolean; + private readonly dragAnimation: string; + private readonly applyFunction: (fn: (...args: any[]) => T) => T; + + constructor(modelService: FcModelService, + applyFunction: (fn: (...args: any[]) => T) => T, + automaticResize: boolean, dragAnimation: string) { + this.modelService = modelService; + this.automaticResize = automaticResize; + this.dragAnimation = dragAnimation; + this.applyFunction = applyFunction; + } + + private getCoordinate(coordinate: number, max: number): number { + coordinate = Math.max(coordinate, 0); + coordinate = Math.min(coordinate, max); + return coordinate; + } + + private getXCoordinate(x: number): number { + return this.getCoordinate(x, this.modelService.canvasHtmlElement.offsetWidth); + } + + private getYCoordinate(y: number): number { + return this.getCoordinate(y, this.modelService.canvasHtmlElement.offsetHeight); + } + + private resizeCanvas(draggedNode: FcNode, nodeElement: HTMLElement) { + if (this.automaticResize && !this.modelService.isDropSource()) { + const canvasElement = this.modelService.canvasHtmlElement; + if (canvasElement.offsetWidth < draggedNode.x + nodeElement.offsetWidth + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.width = canvasElement.offsetWidth + FlowchartConstants.canvasResizeStep + 'px'; + } + if (canvasElement.offsetHeight < draggedNode.y + nodeElement.offsetHeight + FlowchartConstants.canvasResizeThreshold) { + canvasElement.style.height = canvasElement.offsetHeight + FlowchartConstants.canvasResizeStep + 'px'; + } + } + } + + public isDraggingNode(node: FcNode): boolean { + return this.nodeDraggingScope.draggedNodes.includes(node); + } + + public dragstart(event: DragEvent, node: FcNode) { + if (node.readonly) { + return; + } + this.dragOffsets.length = 0; + this.draggedElements.length = 0; + this.nodeDraggingScope.draggedNodes.length = 0; + this.nodeDraggingScope.shadowElements.length = 0; + this.destinationHtmlElements.length = 0; + this.oldDisplayStyles.length = 0; + const elements: Array> = []; + const nodes: Array = []; + if (this.modelService.nodes.isSelected(node)) { + const selectedNodes = this.modelService.nodes.getSelectedNodes(); + for (const selectedNode of selectedNodes) { + const element = $(this.modelService.nodes.getHtmlElement(selectedNode.id)); + elements.push(element); + nodes.push(selectedNode); + } + } else { + elements.push($(event.target as HTMLElement)); + nodes.push(node); + } + const offsetsX: number[] = []; + const offsetsY: number[] = []; + for (const element of elements) { + offsetsX.push(parseInt(element.css('left'), 10) - event.clientX); + offsetsY.push(parseInt(element.css('top'), 10) - event.clientY); + } + const originalEvent: DragEvent = (event as any).originalEvent || event; + if (this.modelService.isDropSource()) { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + nodeDropScope.dropElement = elements[0][0].cloneNode(true) as NodeDropElement; + const offset = $(this.modelService.canvasHtmlElement).offset(); + nodeDropScope.dropElement.offsetInfo = { + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + nodeDropScope.dropElement.style.position = 'absolute'; + nodeDropScope.dropElement.style.pointerEvents = 'none'; + nodeDropScope.dropElement.style.zIndex = '9999'; + + document.body.appendChild(nodeDropScope.dropElement); + const dropNodeInfo: DropNodeInfo = { + node, + dropTargetId: this.modelService.dropTargetId, + offsetX: Math.round(offsetsX[0] + offset.left), + offsetY: Math.round(offsetsY[0] + offset.top) + }; + originalEvent.dataTransfer.setData('text', JSON.stringify(dropNodeInfo)); + + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } else { + const target: HTMLElement = event.target as HTMLElement; + this.destinationHtmlElements.push(target); + this.oldDisplayStyles.push(target.style.display); + target.style.display = 'none'; + this.nodeDraggingScope.shadowDragStarted = true; + } + return; + } + this.nodeDraggingScope.draggedNodes = nodes; + for (let i = 0; i < elements.length; i++) { + this.draggedElements.push(elements[i][0]); + this.dragOffsets.push( + { + x: offsetsX[i], + y: offsetsY[i] + } + ); + } + + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + for (let i = 0; i < this.draggedElements.length; i++) { + const dragOffset = this.dragOffsets[i]; + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + const shadowElement = $(`
` + + `

${draggedNode.name}

`); + const targetInnerNode = $(this.draggedElements[i]).children()[0]; + shadowElement.children()[0].style.backgroundColor = targetInnerNode.style.backgroundColor; + this.nodeDraggingScope.shadowElements.push(shadowElement); + this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[i][0]); + } + } + originalEvent.dataTransfer.setData('text', 'Just to support firefox'); + if (originalEvent.dataTransfer.setDragImage) { + originalEvent.dataTransfer.setDragImage(this.modelService.getDragImage(), 0, 0); + } else { + for (let i = 0; i < this.draggedElements.length; i++) { + this.destinationHtmlElements.push(this.draggedElements[i]); + this.oldDisplayStyles.push(this.destinationHtmlElements[i].style.display); + this.destinationHtmlElements[i].style.display = 'none'; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + this.nodeDraggingScope.shadowDragStarted = true; + } + } + } + + public drop(event: DragEvent): boolean { + if (this.modelService.isDropSource()) { + event.preventDefault(); + return false; + } + let dropNode: FcNode = null; + const originalEvent: DragEvent = (event as any).originalEvent || event; + const infoText = originalEvent.dataTransfer.getData('text'); + if (infoText) { + let dropNodeInfo: DropNodeInfo = null; + try { + dropNodeInfo = JSON.parse(infoText); + } catch (e) {} + if (dropNodeInfo && dropNodeInfo.dropTargetId) { + if (this.modelService.canvasHtmlElement.id && + this.modelService.canvasHtmlElement.id === dropNodeInfo.dropTargetId) { + dropNode = dropNodeInfo.node; + const offset = $(this.modelService.canvasHtmlElement).offset(); + const x = event.clientX - offset.left; + const y = event.clientY - offset.top; + dropNode.x = Math.round(this.getXCoordinate(dropNodeInfo.offsetX + x)); + dropNode.y = Math.round(this.getYCoordinate(dropNodeInfo.offsetY + y)); + } + } + } + if (dropNode) { + this.modelService.dropNode(event, dropNode); + event.preventDefault(); + return false; + } else if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction(() => { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + const dragOffset = this.dragOffsets[i]; + draggedNode.x = Math.round(this.getXCoordinate(dragOffset.x + event.clientX)); + draggedNode.y = Math.round(this.getYCoordinate(dragOffset.y + event.clientY)); + } + event.preventDefault(); + return false; + }); + } + } + + public dragover(event: DragEvent) { + if (nodeDropScope.dropElement) { + const offsetInfo = nodeDropScope.dropElement.offsetInfo; + nodeDropScope.dropElement.style.left = (offsetInfo.offsetX + event.clientX) + 'px'; + nodeDropScope.dropElement.style.top = (offsetInfo.offsetY + event.clientY) + 'px'; + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction(() => { + this.destinationHtmlElements[0].style.display = this.oldDisplayStyles[0]; + this.nodeDraggingScope.shadowDragStarted = false; + }); + } + event.preventDefault(); + return; + } + if (this.modelService.isDropSource()) { + event.preventDefault(); + return; + } + if (!this.nodeDraggingScope.draggedNodes.length) { + event.preventDefault(); + return; + } + if (this.dragAnimation === FlowchartConstants.dragAnimationRepaint) { + if (this.nodeDraggingScope.draggedNodes.length) { + return this.applyFunction(() => { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + const dragOffset = this.dragOffsets[i]; + draggedNode.x = this.getXCoordinate(dragOffset.x + event.clientX); + draggedNode.y = this.getYCoordinate(dragOffset.y + event.clientY); + this.resizeCanvas(draggedNode, this.draggedElements[i]); + } + event.preventDefault(); + return false; + }); + } + } else if (this.dragAnimation === FlowchartConstants.dragAnimationShadow) { + if (this.nodeDraggingScope.draggedNodes.length) { + if (this.nodeDraggingScope.shadowDragStarted) { + this.applyFunction(() => { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + this.destinationHtmlElements[i].style.display = this.oldDisplayStyles[i]; + } + this.nodeDraggingScope.shadowDragStarted = false; + }); + } + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + const dragOffset = this.dragOffsets[i]; + this.nodeDraggingScope.shadowElements[i].css('left', this.getXCoordinate(dragOffset.x + event.clientX) + 'px'); + this.nodeDraggingScope.shadowElements[i].css('top', this.getYCoordinate(dragOffset.y + event.clientY) + 'px'); + this.resizeCanvas(draggedNode, this.draggedElements[i]); + } + event.preventDefault(); + } + } + } + + public dragend(event: DragEvent) { + this.applyFunction(() => { + if (nodeDropScope.dropElement) { + nodeDropScope.dropElement.parentNode.removeChild(nodeDropScope.dropElement); + nodeDropScope.dropElement = null; + } + if (this.modelService.isDropSource()) { + return; + } + if (this.nodeDraggingScope.shadowElements.length) { + for (let i = 0; i < this.nodeDraggingScope.draggedNodes.length; i++) { + const draggedNode = this.nodeDraggingScope.draggedNodes[i]; + const shadowElement = this.nodeDraggingScope.shadowElements[i]; + draggedNode.x = parseInt(shadowElement.css('left').replace('px', ''), 10); + draggedNode.y = parseInt(shadowElement.css('top').replace('px', ''), 10); + this.modelService.canvasHtmlElement.removeChild(shadowElement[0]); + } + this.nodeDraggingScope.shadowElements.length = 0; + } + + if (this.nodeDraggingScope.draggedNodes.length) { + this.nodeDraggingScope.draggedNodes.length = 0; + this.draggedElements.length = 0; + this.dragOffsets.length = 0; + } + }); + } + +} + +export interface NodeDraggingScope { + draggedNodes: Array; + shadowElements: Array>; + shadowDragStarted: boolean; + dropElement: HTMLElement; +} + +export interface NodeDropElement extends HTMLElement { + offsetInfo?: { + offsetX: number; + offsetY: number; + }; +} + +export interface NodeDropScope { + dropElement: NodeDropElement; +} + +export interface DropNodeInfo { + node: FcNode; + dropTargetId: string; + offsetX: number; + offsetY: number; +} diff --git a/projects/ngx-flowchart/src/lib/node.component.scss b/projects/ngx-flowchart/src/lib/node.component.scss new file mode 100644 index 0000000..a81f63d --- /dev/null +++ b/projects/ngx-flowchart/src/lib/node.component.scss @@ -0,0 +1,57 @@ +:host { + position: absolute; + z-index: 1; + &.fc-dragging { + z-index: 10; + } +} + +:host ::ng-deep { + .fc-leftConnectors, .fc-rightConnectors { + position: absolute; + top: 0; + height: 100%; + + display: flex; + flex-direction: column; + + z-index: -10; + .fc-magnet { + align-items: center; + } + } + + .fc-leftConnectors { + left: -20px; + } + + .fc-rightConnectors { + right: -20px; + } + + .fc-magnet { + display: flex; + flex-grow: 1; + height: 60px; + + justify-content: center; + } + + .fc-connector { + width: 18px; + height: 18px; + + border: 10px solid transparent; + -moz-background-clip: padding; /* Firefox 3.6 */ + -webkit-background-clip: padding; /* Safari 4? Chrome 6? */ + background-clip: padding-box; + border-radius: 50% 50%; + background-color: #F7A789; + color: #fff; + pointer-events: all; + + &.fc-hover { + background-color: #000; + } + } +} diff --git a/projects/ngx-flowchart/src/lib/node.component.ts b/projects/ngx-flowchart/src/lib/node.component.ts new file mode 100644 index 0000000..b2edbcb --- /dev/null +++ b/projects/ngx-flowchart/src/lib/node.component.ts @@ -0,0 +1,227 @@ +import { + Component, + ComponentFactoryResolver, Directive, + ElementRef, HostBinding, + HostListener, + Inject, + Input, + OnChanges, + OnInit, + SimpleChanges, + ViewChild, + ViewContainerRef +} from '@angular/core'; +import { + FC_NODE_COMPONENT_CONFIG, + FcCallbacks, + FcConnector, + FcNode, + FcNodeComponentConfig, + FlowchartConstants, + UserNodeCallbacks +} from './ngx-flowchart.models'; +import { FcModelService } from './model.service'; + +@Component({ + selector: 'fc-node', + template: '', + styleUrls: ['./node.component.scss'] +}) +export class FcNodeContainerComponent implements OnInit, OnChanges { + + @Input() + callbacks: FcCallbacks; + + @Input() + userNodeCallbacks: UserNodeCallbacks; + + @Input() + node: FcNode; + + @Input() + selected: boolean; + + @Input() + edit: boolean; + + @Input() + underMouse: boolean; + + @Input() + mouseOverConnector: FcConnector; + + @Input() + modelservice: FcModelService; + + @Input() + dragging: boolean; + + @HostBinding('attr.id') + get nodeId(): string { + return this.node.id; + } + + @HostBinding('style.top') + get top(): string { + return this.node.y + 'px'; + } + + @HostBinding('style.left') + get left(): string { + return this.node.x + 'px'; + } + + nodeComponent: FcNodeComponent; + + @ViewChild('nodeContent', {read: ViewContainerRef, static: true}) nodeContentContainer: ViewContainerRef; + + constructor(@Inject(FC_NODE_COMPONENT_CONFIG) private nodeComponentConfig: FcNodeComponentConfig, + private elementRef: ElementRef, + private componentFactoryResolver: ComponentFactoryResolver) { + } + + ngOnInit(): void { + if (!this.userNodeCallbacks) { + this.userNodeCallbacks = {}; + } + this.userNodeCallbacks.nodeEdit = this.userNodeCallbacks.nodeEdit || (() => {}); + this.userNodeCallbacks.doubleClick = this.userNodeCallbacks.doubleClick || (() => {}); + this.userNodeCallbacks.mouseDown = this.userNodeCallbacks.mouseDown || (() => {}); + this.userNodeCallbacks.mouseEnter = this.userNodeCallbacks.mouseEnter || (() => {}); + this.userNodeCallbacks.mouseLeave = this.userNodeCallbacks.mouseLeave || (() => {}); + + const element = $(this.elementRef.nativeElement); + element.addClass(FlowchartConstants.nodeClass); + if (!this.node.readonly) { + element.attr('draggable', 'true'); + } + this.updateNodeClass(); + this.modelservice.nodes.setHtmlElement(this.node.id, element[0]); + this.nodeContentContainer.clear(); + const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType); + const componentRef = this.nodeContentContainer.createComponent(componentFactory); + this.nodeComponent = componentRef.instance; + this.nodeComponent.callbacks = this.callbacks; + this.nodeComponent.userNodeCallbacks = this.userNodeCallbacks; + this.nodeComponent.node = this.node; + this.nodeComponent.modelservice = this.modelservice; + this.updateNodeComponent(); + } + + ngOnChanges(changes: SimpleChanges): void { + let updateNode = false; + for (const propName of Object.keys(changes)) { + const change = changes[propName]; + if (!change.firstChange && change.currentValue !== change.previousValue) { + if (['selected', 'edit', 'underMouse', 'mouseOverConnector', 'dragging'].includes(propName)) { + updateNode = true; + } + } + } + if (updateNode) { + this.updateNodeClass(); + this.updateNodeComponent(); + } + } + + private updateNodeClass() { + const element = $(this.elementRef.nativeElement); + this.toggleClass(element, FlowchartConstants.selectedClass, this.selected); + this.toggleClass(element, FlowchartConstants.editClass, this.edit); + this.toggleClass(element, FlowchartConstants.hoverClass, this.underMouse); + this.toggleClass(element, FlowchartConstants.draggingClass, this.dragging); + } + + private updateNodeComponent() { + this.nodeComponent.selected = this.selected; + this.nodeComponent.edit = this.edit; + this.nodeComponent.underMouse = this.underMouse; + this.nodeComponent.mouseOverConnector = this.mouseOverConnector; + this.nodeComponent.dragging = this.dragging; + } + + private toggleClass(element: JQuery, clazz: string, set: boolean) { + if (set) { + element.addClass(clazz); + } else { + element.removeClass(clazz); + } + } + + @HostListener('mousedown', ['$event']) + mousedown(event: MouseEvent) { + event.stopPropagation(); + } + + @HostListener('dragstart', ['$event']) + dragstart(event: DragEvent) { + if (!this.node.readonly) { + this.callbacks.nodeDragstart(event, this.node); + } + } + + @HostListener('dragend', ['$event']) + dragend(event: DragEvent) { + if (!this.node.readonly) { + this.callbacks.nodeDragend(event); + } + } + + @HostListener('click', ['$event']) + click(event: MouseEvent) { + if (!this.node.readonly) { + this.callbacks.nodeClicked(event, this.node); + } + } + + @HostListener('mouseover', ['$event']) + mouseover(event: MouseEvent) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOver(event, this.node); + } + } + + @HostListener('mouseout', ['$event']) + mouseout(event: MouseEvent) { + if (!this.node.readonly) { + this.callbacks.nodeMouseOut(event, this.node); + } + } + +} + +export abstract class FcNodeComponent implements OnInit { + + @Input() + callbacks: FcCallbacks; + + @Input() + userNodeCallbacks: UserNodeCallbacks; + + @Input() + node: FcNode; + + @Input() + selected: boolean; + + @Input() + edit: boolean; + + @Input() + underMouse: boolean; + + @Input() + mouseOverConnector: FcConnector; + + @Input() + modelservice: FcModelService; + + @Input() + dragging: boolean; + + flowchartConstants = FlowchartConstants; + + ngOnInit(): void { + } + +} diff --git a/projects/ngx-flowchart/src/lib/rectangleselect.service.ts b/projects/ngx-flowchart/src/lib/rectangleselect.service.ts new file mode 100644 index 0000000..450f0ea --- /dev/null +++ b/projects/ngx-flowchart/src/lib/rectangleselect.service.ts @@ -0,0 +1,114 @@ +import { FcModelService } from './model.service'; +import { FcRectBox } from 'ngx-flowchart-dev'; +import scrollparent from './scrollparent'; + +interface Rectangle { + x1: number; + x2: number; + y1: number; + y2: number; +} + +export class FcRectangleSelectService { + + private readonly selectRect: Rectangle = { + x1: 0, + x2: 0, + y1: 0, + y2: 0 + }; + + private readonly modelService: FcModelService; + private readonly selectElement: HTMLElement; + private readonly $canvasElement: JQuery; + private readonly $scrollParent: JQuery; + private readonly applyFunction: (fn: (...args: any[]) => T) => T; + + constructor(modelService: FcModelService, + selectElement: HTMLElement, + applyFunction: (fn: (...args: any[]) => T) => T) { + this.modelService = modelService; + this.selectElement = selectElement; + this.$canvasElement = $(this.modelService.canvasHtmlElement); + this.$scrollParent = $(scrollparent(this.modelService.canvasHtmlElement)); + this.applyFunction = applyFunction; + } + + public mousedown(e: MouseEvent) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && this.selectElement.hidden) { + this.selectElement.hidden = false; + const offset = this.$canvasElement.offset(); + this.selectRect.x1 = Math.round(e.pageX - offset.left); + this.selectRect.y1 = Math.round(e.pageY - offset.top); + this.selectRect.x2 = this.selectRect.x1; + this.selectRect.y2 = this.selectRect.y1; + this.updateSelectRect(); + } + } + + public mousemove(e: MouseEvent) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + const offset = this.$canvasElement.offset(); + this.selectRect.x2 = Math.round(e.pageX - offset.left); + this.selectRect.y2 = Math.round(e.pageY - offset.top); + this.updateScroll(offset); + this.updateSelectRect(); + } + } + + private updateScroll(offset: JQuery.Coordinates) { + const rect = this.$scrollParent[0].getBoundingClientRect(); + const bottom = rect.bottom - offset.top; + const right = rect.right - offset.left; + const top = rect.top - offset.top; + const left = rect.left - offset.left; + if (this.selectRect.y2 - top < 25) { + const topScroll = 25 - (this.selectRect.y2 - top); + const scroll = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll - topScroll); + } else if (bottom - this.selectRect.y2 < 40) { + const bottomScroll = 40 - (bottom - this.selectRect.y2); + const scroll = this.$scrollParent.scrollTop(); + this.$scrollParent.scrollTop(scroll + bottomScroll); + } + if (this.selectRect.x2 - left < 25) { + const leftScroll = 25 - (this.selectRect.x2 - left); + const scroll = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll - leftScroll); + } else if (right - this.selectRect.x2 < 40) { + const rightScroll = 40 - (right - this.selectRect.x2); + const scroll = this.$scrollParent.scrollLeft(); + this.$scrollParent.scrollLeft(scroll + rightScroll); + } + } + + public mouseup(e: MouseEvent) { + if (this.modelService.isEditable() && !e.ctrlKey && !e.metaKey && e.button === 0 + && !this.selectElement.hidden) { + const rectBox = this.selectElement.getBoundingClientRect() as FcRectBox; + this.selectElement.hidden = true; + this.selectObjects(rectBox); + } + } + + private updateSelectRect() { + const x3 = Math.min(this.selectRect.x1, this.selectRect.x2); + const x4 = Math.max(this.selectRect.x1, this.selectRect.x2); + const y3 = Math.min(this.selectRect.y1, this.selectRect.y2); + const y4 = Math.max(this.selectRect.y1, this.selectRect.y2); + this.selectElement.style.left = x3 + 'px'; + this.selectElement.style.top = y3 + 'px'; + this.selectElement.style.width = x4 - x3 + 'px'; + this.selectElement.style.height = y4 - y3 + 'px'; + } + + private selectObjects(rectBox: FcRectBox) { + this.applyFunction(() => { + this.modelService.selectAllInRect(rectBox); + }); + } + +} + diff --git a/projects/ngx-flowchart/src/lib/scrollparent.ts b/projects/ngx-flowchart/src/lib/scrollparent.ts new file mode 100644 index 0000000..0778a69 --- /dev/null +++ b/projects/ngx-flowchart/src/lib/scrollparent.ts @@ -0,0 +1,19 @@ +const regex = /(auto|scroll)/; + +const style = (node: Element, prop: string): string => + getComputedStyle(node, null).getPropertyValue(prop); + +const scroll = (node: Element) => + regex.test( + style(node, 'overflow') + + style(node, 'overflow-y') + + style(node, 'overflow-x')); + +const scrollparent = (node: HTMLElement): HTMLElement => + !node || node === document.body + ? document.body + : scroll(node) + ? node + : scrollparent(node.parentNode as HTMLElement); + +export default scrollparent; diff --git a/projects/ngx-flowchart/src/public-api.ts b/projects/ngx-flowchart/src/public-api.ts index 9aba525..ae98263 100644 --- a/projects/ngx-flowchart/src/public-api.ts +++ b/projects/ngx-flowchart/src/public-api.ts @@ -2,6 +2,7 @@ * Public API Surface of ngx-flowchart */ -export * from './lib/ngx-flowchart.service'; export * from './lib/ngx-flowchart.component'; export * from './lib/ngx-flowchart.module'; +export * from './lib/ngx-flowchart.models'; +export { FcNodeComponent } from './lib/node.component'; diff --git a/projects/ngx-flowchart/tsconfig.lib.json b/projects/ngx-flowchart/tsconfig.lib.json index bd23948..c822d5e 100644 --- a/projects/ngx-flowchart/tsconfig.lib.json +++ b/projects/ngx-flowchart/tsconfig.lib.json @@ -3,9 +3,11 @@ "compilerOptions": { "outDir": "../../out-tsc/lib", "target": "es2015", + "module": "es2015", + "moduleResolution": "node", "declaration": true, "inlineSources": true, - "types": [], + "types": ["jquery"], "lib": [ "dom", "es2018" diff --git a/src/app/app.component.html b/src/app/app.component.html index 0b2e8e1..dd0cd7a 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,10 +1,31 @@ - -
-

- Welcome to {{ title }}! -

- Angular Logo -
-
- +
+
+ + +
+
+
+
+
+ + + +
+ + +
diff --git a/src/app/app.component.scss b/src/app/app.component.scss index e69de29..ad010ea 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -0,0 +1,59 @@ +:host { + display: flex; + flex: 1; + overflow: hidden; + outline: none; + + .fc-container { + display: flex; + flex: 1; + flex-direction: row; + overflow: hidden; + } + + .fc-left-pane { + flex: 0.15; + overflow: auto; + } + + .fc-divider { + flex: 0.01; + } + + .fc-right-pane { + flex: 0.84; + overflow: auto; + } + + .button-overlay { + position: absolute; + top: 40px; + z-index: 10; + } + + .button-overlay button { + display: block; + padding: 10px; + margin-bottom: 15px; + border-radius: 10px; + border: none; + box-shadow: none; + color: #fff; + font-size: 20px; + background-color: #F15B26; + user-select: none; + } + + .button-overlay button:hover:not(:disabled) { + border: 4px solid #b03911; + border-radius: 5px; + margin: -4px; + margin-bottom: 11px; + } + + .button-overlay button:disabled { + -webkit-filter: brightness(70%); + filter: brightness(70%); + } + +} diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts deleted file mode 100644 index 473fe27..0000000 --- a/src/app/app.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - })); - - it('should create the app', () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app).toBeTruthy(); - }); - - it(`should have as title 'ngx-flowchart'`, () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('ngx-flowchart'); - }); - - it('should render title in a h1 tag', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to ngx-flowchart!'); - }); -}); diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 1e26c1b..76da10d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,10 +1,280 @@ -import { Component } from '@angular/core'; +import { AfterViewInit, Component, HostBinding, HostListener, ViewChild, ViewContainerRef } from '@angular/core'; +import { FcModel, FcNode, FlowchartConstants, NgxFlowchartComponent, UserCallbacks } from 'ngx-flowchart-dev'; +import { of } from 'rxjs'; +import { A, CONTROL, DELETE, ESCAPE } from '@angular/cdk/keycodes'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) -export class AppComponent { - title = 'ngx-flowchart'; +export class AppComponent implements AfterViewInit { + + @HostBinding('attr.tabindex') + get tabindex(): string { + return '0'; + } + + flowchartConstants = FlowchartConstants; + + nodeTypesFlowchartselected = []; + nodeTypesModel: FcModel = { + nodes: [], + edges: [] + }; + + flowchartselected = []; + model: FcModel = { + nodes: [], + edges: [] + }; + nextNodeID = 10; + nextConnectorID = 20; + + callbacks: UserCallbacks = { + edgeDoubleClick: (event, edge) => { + console.log('Edge double clicked.'); + }, + edgeEdit: (event, edge) => { + const label = prompt('Enter a link label:', edge.label); + if (label) { + edge.label = label; + } + }, + edgeMouseOver: event => { + console.log('mouserover'); + }, + isValidEdge: (source, destination) => { + return source.type === FlowchartConstants.rightConnectorType && destination.type === FlowchartConstants.leftConnectorType; + }, + createEdge: (event, edge) => { + if (!edge.label) { + const label = prompt('Enter a link label:', 'New label'); + edge.label = label; + } + return of(edge); + }, + dropNode: (event, node) => { + const name = prompt('Enter a node name:', node.name); + if (name) { + node.name = name; + node.id = (this.nextNodeID++) + ''; + node.connectors = [ + { + id: (this.nextConnectorID++) + '', + type: FlowchartConstants.leftConnectorType + }, + { + id: (this.nextConnectorID++) + '', + type: FlowchartConstants.rightConnectorType + } + ]; + this.model.nodes.push(node); + } + }, + edgeAdded: edge => { + console.log('edge added'); + console.log(edge); + }, + nodeRemoved: node => { + console.log('node removed'); + console.log(node); + }, + edgeRemoved: edge => { + console.log('edge removed'); + console.log(edge); + }, + nodeCallbacks: { + doubleClick: event => { + console.log('Node was doubleclicked.'); + }, + nodeEdit: (event, node) => { + const name = prompt('Enter a node name:', node.name); + if (name) { + node.name = name; + } + } + } + }; + + @ViewChild('fcCanvas', {static: true}) fcCanvas: NgxFlowchartComponent; + + constructor() { + this.initData(); + } + + ngAfterViewInit(): void { + console.log(this.fcCanvas.modelService); + } + + private initData() { + for (let i = 0; i < 10; i++) { + const node: FcNode = { + name: 'type' + i, + id: (i + 1) + '', + x: 50, + y: 100 * (i + 1), + connectors: [ + { + type: FlowchartConstants.leftConnectorType, + id: (i * 2 + 1) + '' + }, + { + type: FlowchartConstants.rightConnectorType, + id: (i * 2 + 2) + '' + } + ] + }; + this.nodeTypesModel.nodes.push(node); + } + this.model.nodes.push(... + [ + { + name: 'ngxFlowchart', + readonly: true, + id: '2', + x: 300, + y: 100, + color: '#000', + borderColor: '#000', + connectors: [ + { + type: FlowchartConstants.leftConnectorType, + id: '1' + }, + { + type: FlowchartConstants.rightConnectorType, + id: '2' + } + ] + }, + { + name: 'Implemented with Angular', + id: '3', + x: 600, + y: 100, + color: '#F15B26', + connectors: [ + { + type: FlowchartConstants.leftConnectorType, + id: '3' + }, + { + type: FlowchartConstants.rightConnectorType, + id: '4' + } + ] + }, + { + name: 'Easy Integration', + id: '4', + x: 1000, + y: 100, + color: '#000', + borderColor: '#000', + connectors: [ + { + type: FlowchartConstants.leftConnectorType, + id: '5' + }, + { + type: FlowchartConstants.rightConnectorType, + id: '6' + } + ] + }, + { + name: 'Customizable templates', + id: '5', + x: 1300, + y: 100, + color: '#000', + borderColor: '#000', + connectors: [ + { + type: FlowchartConstants.leftConnectorType, + id: '7' + }, + { + type: FlowchartConstants.rightConnectorType, + id: '8' + } + ] + } + ] + ); + this.model.edges.push(... + [ + { + source: '2', + destination: '3', + label: 'label1' + }, + { + source: '4', + destination: '5', + label: 'label2' + }, + { + source: '6', + destination: '7', + label: 'label3' + } + ] + ); + } + + @HostListener('keydown.control.a', ['$event']) + public onCtrlA(event: KeyboardEvent) { + this.fcCanvas.modelService.selectAll(); + } + + @HostListener('keydown.esc', ['$event']) + public onEsc(event: KeyboardEvent) { + this.fcCanvas.modelService.deselectAll(); + } + + @HostListener('keydown', ['$event']) + public onKeydown(event: KeyboardEvent) { + if (event.keyCode === DELETE) { + this.fcCanvas.modelService.deleteSelected(); + } + } + + public addNewNode() { + const nodeName = prompt('Enter a node name:', 'New node'); + if (!nodeName) { + return; + } + + const newNode: FcNode = { + name: nodeName, + id: (this.nextNodeID++) + '', + x: 200, + y: 100, + color: '#F15B26', + connectors: [ + { + id: (this.nextConnectorID++) + '', + type: FlowchartConstants.leftConnectorType + }, + { + id: (this.nextConnectorID++) + '', + type: FlowchartConstants.rightConnectorType + } + ] + }; + this.model.nodes.push(newNode); + } + + public activateWorkflow() { + this.model.edges.forEach((edge) => { + edge.active = !edge.active; + }); + this.fcCanvas.modelService.detectChanges(); + } + + public deleteSelected() { + this.fcCanvas.modelService.deleteSelected(); + } } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 70dc55e..6679982 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -2,17 +2,29 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; -import { NgxFlowchartModule } from 'ngx-flowchart'; +import { FC_NODE_COMPONENT_CONFIG, NgxFlowchartModule } from 'ngx-flowchart-dev'; +import { TestFcNodeComponent } from './test-node.component'; @NgModule({ + entryComponents: [ + TestFcNodeComponent + ], + /*providers: [ + { + provide: FC_NODE_COMPONENT_CONFIG, + useValue: { + nodeComponentType: TestFcNodeComponent + } + } + ],*/ declarations: [ - AppComponent + AppComponent, + TestFcNodeComponent ], imports: [ BrowserModule, NgxFlowchartModule ], - providers: [], bootstrap: [AppComponent] }) export class AppModule { } diff --git a/src/app/test-node.component.html b/src/app/test-node.component.html new file mode 100644 index 0000000..4b09358 --- /dev/null +++ b/src/app/test-node.component.html @@ -0,0 +1,4 @@ +
+ {{ node | json }} +
diff --git a/src/app/test-node.component.ts b/src/app/test-node.component.ts new file mode 100644 index 0000000..100396d --- /dev/null +++ b/src/app/test-node.component.ts @@ -0,0 +1,15 @@ +import { Component } from '@angular/core'; +import { FcNodeComponent } from 'ngx-flowchart-dev'; + +@Component({ + selector: 'app-default-node', + templateUrl: './test-node.component.html', + styleUrls: [] +}) +export class TestFcNodeComponent extends FcNodeComponent { + + constructor() { + super(); + } + +} diff --git a/src/index.html b/src/index.html index 4185df9..2b8acd8 100644 --- a/src/index.html +++ b/src/index.html @@ -7,6 +7,7 @@ + diff --git a/src/styles.scss b/src/styles.scss index 90d4ee0..fac5923 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1 +1,10 @@ /* You can add global styles to this file, and also import other style files */ + +body { + font-family: sans-serif; + margin: 0; + display: flex; + flex-direction: column; + flex: 1; + height: 100vh; +} diff --git a/tsconfig.app.json b/tsconfig.app.json index 31f8397..466b5db 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -2,7 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/app", - "types": [] + "types": ["jquery"] }, "include": [ "src/**/*.ts" diff --git a/tsconfig.json b/tsconfig.json index 97edf7b..62a45d5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,7 +24,10 @@ ], "ngx-flowchart/*": [ "dist/ngx-flowchart/*" + ], + "ngx-flowchart-dev": [ + "projects/ngx-flowchart/src/public-api" ] } } -} \ No newline at end of file +}